L
ll
Hi,
I am needing help in the use of sheet codename in VBA. Currently,
I've successfully assigned the sheet codename to a string variable and
have tested it with a msgbox. I get error messages when the code gets
'below' the msgbox line (into the cell selection area.
Does anyone know what the proper syntax is for selecting all cells in
a sheet (referring to the sheet with its codename, rather than its
worksheet (tab) name)?
Thanks for your help,
Louis
----------
'\\\\CodeNameString = LCase(wks.CodeName)
CodeNameString = wks.CodeName
Response = MsgBox(CodeNameString, vbYesNoCancel + vbCritical +
vbDefaultButton2)
If CodeNameString = "Sheet1" Then
'\\\\LOldWb.Sheets(CodeNameString).Visible = True
'\\\\LOldWb.Sheets(CodeNameString).Select
LOldWb.Sheets(CodeNameString).Cells.Select
I am needing help in the use of sheet codename in VBA. Currently,
I've successfully assigned the sheet codename to a string variable and
have tested it with a msgbox. I get error messages when the code gets
'below' the msgbox line (into the cell selection area.
Does anyone know what the proper syntax is for selecting all cells in
a sheet (referring to the sheet with its codename, rather than its
worksheet (tab) name)?
Thanks for your help,
Louis
----------
'\\\\CodeNameString = LCase(wks.CodeName)
CodeNameString = wks.CodeName
Response = MsgBox(CodeNameString, vbYesNoCancel + vbCritical +
vbDefaultButton2)
If CodeNameString = "Sheet1" Then
'\\\\LOldWb.Sheets(CodeNameString).Visible = True
'\\\\LOldWb.Sheets(CodeNameString).Select
LOldWb.Sheets(CodeNameString).Cells.Select