Function Col_Letter(lngCol As Long) As String
Dim vArr
vArr = Split(Cells(1, lngCol).Address(True, False), "$")
Col_Letter = vArr(0)
End Function
Sub Test()
MsgBox Col_Letter(100)
End Sub
Sub ProtectionOptions()
ActiveSheet.Unprotect
' Allow cells to be formatted on a protected worksheet.
If ActiveSheet.Protection.AllowFormattingCells = False Then
ActiveSheet.Protect AllowFormattingCells:=True
End If
MsgBox "Cells can be formatted on this protected worksheet."
End Sub
Part
|
Description
|
object
|
Required. Always the
name of a FileSystemObject or Folder object.
|
filename
|
|
overwrite
|
Optional. Boolean value that indicates if an existing file
can be overwritten. The value is True if the file can be overwritten; False if it can't be overwritten. If omitted, existing files are not
overwritten.
|
unicode
|
Optional. Boolean value that indicates whether the file is
created as a Unicode or ASCII file. The value is True if the file is created as a Unicode file; False if it's created as an ASCII file. If
omitted, an ASCII file is assumed.
|