Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi there
I would like a macro to run on open in a particular workbook. I know there is a simple visual basic line that will do this for me but it escapes me! Does anyone know? Thanks |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
You need to place the code (or reference it from) the Workbook_Open event in the ThisWorkbook module of the workbook concerned - navigate to the little Excel workbook icon next to the File Menu, right-click and go View Code. This brings up the Visual Basic Editor with the ThisWorkbook module open. Paste your code in there with the following name: Private Sub Workbook_Open() 'Your code here End Sub I hope this helps! Richard JaB wrote: Hi there I would like a macro to run on open in a particular workbook. I know there is a simple visual basic line that will do this for me but it escapes me! Does anyone know? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can a Macro open workbooks on a SharePoint Site? | Excel Discussion (Misc queries) | |||
error when running cut & paste macro | Excel Worksheet Functions | |||
Open File within a macro | Excel Discussion (Misc queries) | |||
Macro to open files isn't updating correctly | Excel Discussion (Misc queries) | |||
Open another program(Word) with Excel macro? | New Users to Excel |