Can I refer to a sheet in another book by its codename?
I am not sure I understood your query correctly.
Edit the workbookname as displayed on the caption...Using the workbook
object you can access any open workbook
Sub Macro()
Dim wb As Workbook
Set wb = Workbooks("book1.xls")
MsgBox wb.Worksheets("Sheet1").Range("A1")
End Sub
--
Jacob (MVP - Excel)
"Michelle" wrote:
I want to refer to sheets' codenames that are set up in the active book from
another book (or an add-in)
e.g. MsgBox ActiveWorkbook.SheetCodeNameHere.Cells(6, 2).Value
Can I do that?
M
|