Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook with running macros and being
inexperienced in VBA I often used ActiveWorkbook to refer to that workbook in macro code. For example, inside Worksheet_Calculate() event I use ActiveWorkbook.Worksheets("X").range("A1") = time() The problem with Activeworkbook is that when I double click on any Excel file to open, it opens inside my workbook with macros and now ActiveWorkbook becomes this new workbook, which causes the error since new workbook doesn't have sheet X, but even if it did I dont want to display time on new workbook. Anyways, I want macro workbook to prevent having new workbooks open inside it's excel app instance. Hope it's not too wordy for simple problem. Serge |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
when opening an Excel Workbook, another blank workbook also opens | Excel Discussion (Misc queries) | |||
when opening an Excel Workbook, another blank workbook also opens | Excel Discussion (Misc queries) | |||
Active Cell when opening workbook | Excel Worksheet Functions | |||
copy worksheet from closed workbook to active workbook using vba | Excel Worksheet Functions | |||
Question for Experts: Opening workbook with workbook references | Excel Programming |