|
-
May 15th, 2005, 11:23 AM
#1
Thread Starter
Member
VBA Excel:A beginner questions
HI all,
Please, can someone let me know where should i put my syntax if i want it to preform whenever I execute the spreadsheet (Such as a MsgBox).
Is it a matter of syntax or the location of my code that make it to be authomatically opened
In addition, where should i save my macros in order to be opened in any given new spreadshhet?
Many Thanks,
Ben
-
May 15th, 2005, 11:26 AM
#2
Re: VBA Excel:A beginner questions
Put your msgbox in the workbook open event in ThisWorkbook class.
VB Code:
Private Sub Workbook_Open()
MsgBox "Opened"
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 15th, 2005, 11:38 AM
#3
Thread Starter
Member
Re: VBA Excel:A beginner questions
-
May 15th, 2005, 12:08 PM
#4
Re: VBA Excel:A beginner questions
Oh, I missed the second part of your question. Save your macros and code to a personal macros sheet. When recording a
macro you will be prompted on the location of where to save to.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 15th, 2005, 12:36 PM
#5
Thread Starter
Member
Re: VBA Excel:A beginner questions
Cheers RobDog888
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|