+ Reply to Thread
Results 1 to 5 of 5

Method 'Range' of object '_Global' failed error message on running userform when another

Hybrid View

sivakumar123 Method 'Range' of object... 08-01-2012, 11:16 AM
Kyle123 Re: Method 'Range' of object... 08-01-2012, 11:17 AM
sivakumar123 Re: Method 'Range' of object... 08-01-2012, 11:31 AM
Kyle123 Re: Method 'Range' of object... 08-01-2012, 11:33 AM
sivakumar123 Re: Method 'Range' of object... 08-01-2012, 11:39 AM
  1. #1
    Registered User
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    19

    Method 'Range' of object '_Global' failed error message on running userform when another

    Hi,

    When some other excel file is open and then when i try to run my userform, i get the error message Method 'Range' of object '_Global' failed.

    The line of code that is highlighted is ContactForm.Show in ThisWoorkbook.

    Kindly help me out on this.

    Thanks and Regards
    Sivakumar

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Method 'Range' of object '_Global' failed error message on running userform when anoth

    Hi

    You're going to need to post the code from your userform

  3. #3
    Registered User
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Method 'Range' of object '_Global' failed error message on running userform when anoth

    Hi,

    PFB the code.

    Private Sub Workbook_Open()
    'Application.Visible = False
    Call delHyperlinks
    ActiveWindow.WindowState = xlMinimized
    Application.Visible = False
    ContactForm.Show
    End Sub

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Method 'Range' of object '_Global' failed error message on running userform when anoth

    No, not from this_workbook.

    We need the code from the userform

  5. #5
    Registered User
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Method 'Range' of object '_Global' failed error message on running userform when anoth

    Hi Kyle,

    Just got it to work...
    I used ThisWorkbook.Application.WindowState = xlMinimized in place of ActiveWindow.WindowState = xlMinimized in the code I provided above.

    Thanks a lot for your time.

    Best Regards
    Sivakumar

+ Reply to Thread

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