Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Userform focus question

  1. #11
    MrExcel MVP
    Colo's Avatar
    Join Date
    Mar 2002
    Location
    Kobe, Japan
    Posts
    1,456
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)

    Default

    Hi all,

    I know it's too late, but just an information...@:D


    'This workbook module
    Private Sub Workbook_Open()
    Application.Visible = False
    UserForm1.Show
    End Sub

    'userform1 module

    Private Sub UserForm_Click()
    MsgBox "Make Excel Visible"
    Unload Me
    End Sub

    Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    Application.Visible = True
    End Sub
    Hope this helps + pen pineapple apple pen!

    Masaru Kaji aka Colo - cellmasters.net

  2. #12
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-09-25 21:58, Colo wrote:
    Hi all,

    I know it's too late, but just an information...@:D


    'This workbook module
    Private Sub Workbook_Open()
    Application.Visible = False
    UserForm1.Show
    End Sub

    'userform1 module

    Private Sub UserForm_Click()
    MsgBox "Make Excel Visible"
    Unload Me
    End Sub

    Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    Application.Visible = True
    End Sub
    Colo
    I saw the post and was going to suggest the same
    As this is one of the functions for the Html Addin for Excel2000
    Kind Regards,
    Ivan F Moala From the City of Sails

  3. #13
    MrExcel MVP
    Colo's Avatar
    Join Date
    Mar 2002
    Location
    Kobe, Japan
    Posts
    1,456
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)

    Default

    Hi Ivan, I didn't know...
    I also thought about another method using VBS...
    How about this? When double click VBS file, execl will be executed,
    but user can't see Excel application it self.


    'VBS FILE
    'Save this code as *ExecuteXL.VBS*
    '------------------------------------------------------------------
    xl_file_full_path="C:Sample.xls" 'Change here to your XL full path
    set appXL = CreateObject("Excel.Application")
    appXL.Workbooks.open(xl_file_full_path)
    set appXL=nothing
    '-------------------------------------------------------------------

    'XL FILE named *Sample.xls*
    '---ThisWorkbook module---------------------------------------------
    Private Sub Workbook_Open()
    UserForm1.Show
    End Sub

    '---UserForm1 module--------------------------------------------------
    Private Sub UserForm_Click()
    Application.Visible = True
    End Sub
    '----------------------------------------------------------------------



    _________________
    HTH

    With Regards,
    Colo



    [ This Message was edited by: Colo on 2002-09-25 23:30 ]

  4. #14
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-09-25 22:34, Colo wrote:
    Hi Ivan, I didn't know...
    I also thought about another method using VBS...
    How about this? When double click VBS file, execl will be executed,
    but user can't see Excel application it self.


    'VBS FILE
    'Save this code as *ExecuteXL.VBS*
    '------------------------------------------------------------------
    xl_file_full_path="C:Sample.xls" 'Change here to your XL full path
    set appXL = CreateObject("Excel.Application")
    with appXL
    appXL.Workbooks.open(xl_file_full_path)
    End with
    set appXL=nothing
    '-------------------------------------------------------------------

    'XL FILE named *Sample.xls*
    '---ThisWorkbook module---------------------------------------------
    Private Sub Workbook_Open()
    UserForm1.Show
    End Sub

    '---UserForm1 module--------------------------------------------------
    Private Sub UserForm_Click()
    Application.Visible = True
    End Sub
    '----------------------------------------------------------------------


    Yes, that will do very nicely.
    If you place the script file on the Desk Top
    then all the user has to do is Double click ont the Icon....user can Also change the Icon so that it appears as an Application other then Excel......

    Good one..


    Kind Regards,
    Ivan F Moala From the City of Sails

  5. #15
    Wizard Deluxe
    Join Date
    Jun 2002
    Posts
    348
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Well, you know I am going to have to take this one - too handy to pass up!!

    LOL!

    [ This Message was edited by: ViperGTS on 2002-09-26 15:45 ]

  6. #16
    Board Regular
    Join Date
    Mar 2002
    Location
    Phoenix, Arizona
    Posts
    529
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Colo - Very cool! I am going to use this one. One thing I noticed... you are not prompted with the Enable Macros dialog when opening the Workbook this way as you would be for the same Workbook opened normally.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •