Results 1 to 6 of 6

Thread: *Resolved* Welcome Message (dialog box) for Excel

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2004
    Location
    Right here
    Posts
    275

    Resolved *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.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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:
    1. 'Inside 'ThisWorkbook' Object
    2. Private Sub Workbook_Open()
    3.     UserForm1.Show vbModal
    4. End Sub
    5.  
    6. 'Behind Forms Objects
    7. Private Sub UserForm_Initialize()
    8.     Label1.Caption = "Version xx.x" & vbNewLine & "Licensed to RobDog888"
    9.     CommandButton1.Caption = "Ok"
    10. End Sub
    11.  
    12. Private Sub CommandButton1_Click()
    13.     Unload Me
    14. 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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2004
    Location
    Right here
    Posts
    275

    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

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    May 2004
    Location
    Right here
    Posts
    275

    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.

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    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 PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI 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
  •  



Click Here to Expand Forum to Full Width