Name Statement

๊ธฐ์กด ํŒŒ์ผ ๋˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ์˜ ์ด๋ฆ„์„ ๋ฐ”๊ฟ‰๋‹ˆ๋‹ค.

๊ตฌ๋ฌธ:


Name OldName As String As NewName As String

๋งค๊ฐœ ๋ณ€์ˆ˜:

OldName, NewName: ๊ฒฝ๋กœ๋ฅผ ํฌํ•จํ•œ ํŒŒ์ผ ์ด๋ฆ„์„ ์ง€์ •ํ•˜๋Š” ์ž„์˜์˜ ๋ฌธ์ž์—ด ์‹์ž…๋‹ˆ๋‹ค. URL ํ‘œ๊ธฐ๋ฒ•์„ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

์˜ˆ:


Sub ExampleReName
On Error GoTo Error
FileCopy "c:\autoexec.bat", "c:\temp\autoexec.sav"
Name "c:\temp\autoexec.sav" As "c:\temp\autoexec.bat"
End
Error:
If err = 58 Then
    msgbox "File already exists"
End If
End
End Sub

Please support us!