Results 1 to 3 of 3

Excel 2003 Userform.Show error

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Excel 2003 Userform.Show error

    Hi All,

    I have a problem that is not showing up in excel 2010 (my computer), but is showing up in excel 2003(co-workers computer).

    Here is my code in ThisWorkbook

    Private Sub Workbook_Open()
    Application.DisplayAlerts = False
        
        'If the username is not listed below it will notify the user that they only have access to the reports, they cannot enter any data into the log
        If LCase(Environ("username")) = "username" Then
            InitialForm.Show
        Else
            msg = MsgBox("You only have access to run reports from this file. Please contact the program administrator if you wish to gain access to the data entry.", vbOKOnly, "Authorization")
            If msg = vbOK Then
                InitialForm.Show
            End If
        End If
    Application.DisplayAlerts = True
    End Sub
    When i change the name of the "username" and run it on my computer i get the message box and click ok and the initial form shows just fine and i can push bottons and go from there. When i open the workbook on my co-workers computer (excel 2003), i see the message box then for some reason the VBA editor opens and so does the initial form, but the initial form does not do anything, no buttons work. When i go to the VBA Editor it looks as though something is running.... I am not sure what though, so i click the stop button then manually find the initial form and run it. Everything works good from there. I am not sure why the initial form is showing and not activating, also why is VBA Editor opening when i click ok on the message i have created. Thanks for all the help in advance.


    Edit: I have even deleted the lines for my msgbox and the same thing is happening the intial form shows but it is not "active" for some reason, none of my buttons on it work. Does 2003 not allow the workbook_open() command in ThisWorkbook?
    Last edited by amotto11; 04-25-2013 at 04:39 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1