Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm sure the gurus can explain this in more detail, but basically ThisWorkbook
refers to the workbook the macro is stored in, and ActiveWorkbook refers to the - yes - active workbook. Enter the following macro in a code module: '---- Public Sub WorkbookNames() MsgBox "This = " & ThisWorkbook.Name & " Active = " & ActiveWorkbook.Name End Sub '---- HTH Anders Silvén "Rich" skrev i meddelandet ... How can I control the workbook reference when I assign a macro to a toolbar button? I want the workbook reference to always be the current workbook. TIA, Rich |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing Column Reference in Macros? | Excel Discussion (Misc queries) | |||
Appropriate use of cell reference when creating macros | Excel Discussion (Misc queries) | |||
Relative Reference Help Macros | Excel Worksheet Functions | |||
how do the macros get data from te reference tables? | Excel Discussion (Misc queries) | |||
How do I save a workbook as a new workbook by using macros? | Excel Discussion (Misc queries) |