|
-
Dec 30th, 2004, 02:18 PM
#1
Thread Starter
Hyperactive Member
*Resolved* Welcome Message (dialog box) for Excel
I am writing an Excel app. which I intend to try and sell and so for each person/company that buys it I need a customised dialog box (userform) which will contain their details to show that they have the license for that copy.
E.g. on loading the app. in Excel a dialog box opens which states:
----------------------------------------------
My App v1.0
This copy is licensed to Bob Smith of Smith Co.
---------------------------------------------
I've tried a few things but can't get this to work. I would have thought it should be easy but no luck so far.
I don't even know which module I need to put the code in to make it run when the application opens! Anyone got any ideas?
Cheers
-Rob
Last edited by TheRobster; Dec 30th, 2004 at 07:51 PM.
-
Dec 30th, 2004, 03:28 PM
#2
Re: Welcome Message (dialog box) for Excel
Is your app written all in an Add-In or VB automation exe?
Also, is it required to have Macros enabled?
This will work if Macros are enabled and its not in an Add-In. Add-In code
would be similar.
VB Code:
'Inside 'ThisWorkbook' Object
Private Sub Workbook_Open()
UserForm1.Show vbModal
End Sub
'Behind Forms Objects
Private Sub UserForm_Initialize()
Label1.Caption = "Version xx.x" & vbNewLine & "Licensed to RobDog888"
CommandButton1.Caption = "Ok"
End Sub
Private Sub CommandButton1_Click()
Unload Me
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 
-
Dec 30th, 2004, 03:42 PM
#3
Thread Starter
Hyperactive Member
Re: Welcome Message (dialog box) for Excel
It's just a standard Excel application, not an Add-In (I wouldn't know how to make an Add-In anyway).
It needs to have macros enabled as there is a lot of VBA code in the application, a lot of macros and a lot of userforms.
Also:
Code:
UserForm1.Show vbModal
What does this line do? I've not seen the vbModal command before and I can't find it in the VBA help file.
Cheers
-Rob
-
Dec 30th, 2004, 03:50 PM
#4
Re: Welcome Message (dialog box) for Excel
Its under FormShowConstants in the Object Browser (F2). What it does it exactly
what the VB version does, stops code execution until the form is dismissed.
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 
-
Dec 30th, 2004, 04:54 PM
#5
Thread Starter
Hyperactive Member
Re: Welcome Message (dialog box) for Excel
Ah, okay. Do I need it in the code though? I've just tried it without the vbModal part and it seems to work fine.
-
Dec 30th, 2004, 05:04 PM
#6
Re: Welcome Message (dialog box) for Excel
It would force the user to dismiss the form instead of potentially leaving the
form open during the entire users session.
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 
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
|