![]() |
Quick and Easy!
What is the proper 'Sub' - 'End Sub' Syntax to make some VBA run when the
Excel file is first opened? Workbook_Open() something or other???? DBAL Thanks! |
Quick and Easy!
Private Sub Workbook_Open()
End Sub Pasted in the ThisWorkbook Object in the VBE Right Click on Excel Icon in the upper left of the Excel Window and choose View Code. Paste this code. HTH "DBAL" wrote: What is the proper 'Sub' - 'End Sub' Syntax to make some VBA run when the Excel file is first opened? Workbook_Open() something or other???? DBAL Thanks! |
Quick and Easy!
Ahh man, so that's the problem, I had the right code, but I guess it was in
the wrong place! So the workbook code is kept in a different spot then... Thanks! "Jim Thomlinson" wrote: Private Sub Workbook_Open() End Sub Pasted in the ThisWorkbook Object in the VBE Right Click on Excel Icon in the upper left of the Excel Window and choose View Code. Paste this code. HTH "DBAL" wrote: What is the proper 'Sub' - 'End Sub' Syntax to make some VBA run when the Excel file is first opened? Workbook_Open() something or other???? DBAL Thanks! |
Quick and Easy!
you can also use
Sub Auto_Open() ' your code End SUb in a standard module "DBAL" wrote: What is the proper 'Sub' - 'End Sub' Syntax to make some VBA run when the Excel file is first opened? Workbook_Open() something or other???? DBAL Thanks! |
All times are GMT +1. The time now is 10:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com