Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Method 'Run' of object '_Global' failed when changing OS and Office versions

I am getting a Run-time error '1004': Method 'Run' of
object '_Global' failed when running the same code that
works perfectly on NT 4.0, Excel 97. Forced to move to
Win 2000 with Excel 2000. Not an Excel or VB expert, so
the Microsoft Knowledgebase hit didn't help me.

I have a subrouting called DoIt:

Sub DoIt()
Sheet1.Initializer
Sheet1.loadup
Sheet1.copyover
Sheet1.titles
Sheet1.BuildIOPacektsChart
Sheet1.BuildIOPacketErrsChart
Sheet1.Conv2html
Sheet1.ToGifs
Sheet1.SaveHtml

End Sub

It is called from the Auto_Open function to run when the
file is executed:

Public Sub Auto_Open()
' Will automatically run when this app is started.

Run ("Sheet1.DoIt")

Application.DisplayAlerts = False
' Quit - close down Excel.
Application.Quit

End Sub

The failure happens on the line: Run ("Sheet1.DoIt")

I have absolutely no idea where to even start. Any help
would be greatly appreciated.

Thanks.
Ronj
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Method 'Run' of object '_Global' failed when changing OS and Office versions

Ronj,

Not sure about your syntax.
Looks like your code is in sheet modules. If so you will have problems.
It will only work if the code you are calling is in a standard module.

Instead of Run, I like to use the form
Module1.Macro1 'change the names to match your code.

steve

"Ronj" wrote in message
...
I am getting a Run-time error '1004': Method 'Run' of
object '_Global' failed when running the same code that
works perfectly on NT 4.0, Excel 97. Forced to move to
Win 2000 with Excel 2000. Not an Excel or VB expert, so
the Microsoft Knowledgebase hit didn't help me.

I have a subrouting called DoIt:

Sub DoIt()
Sheet1.Initializer
Sheet1.loadup
Sheet1.copyover
Sheet1.titles
Sheet1.BuildIOPacektsChart
Sheet1.BuildIOPacketErrsChart
Sheet1.Conv2html
Sheet1.ToGifs
Sheet1.SaveHtml

End Sub

It is called from the Auto_Open function to run when the
file is executed:

Public Sub Auto_Open()
' Will automatically run when this app is started.

Run ("Sheet1.DoIt")

Application.DisplayAlerts = False
' Quit - close down Excel.
Application.Quit

End Sub

The failure happens on the line: Run ("Sheet1.DoIt")

I have absolutely no idea where to even start. Any help
would be greatly appreciated.

Thanks.
Ronj



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Method 'Run' of object '_Global' failed when changing OS and Office versions

[This followup was posted to microsoft.public.excel.programming with an
email copy to Ronj.
Please use the newsgroup for further discussion.]

Once you replace the Run with just Sheet1.DoIt (as suggested by Steve),
what happens if you step through the code (with F8)? It should
pinpoint the line tha generates the error.

Of course, I don't quite understand why all the code is buried in the
Sheet1 module since it doesn't seem to be related to the sheet1 object.
But, that is another story.

--
Trouble finding replies to your posts? Use a newsreader. See the
tutorial 'Outlook Express and Newsgroups' on my web site

Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article , ronj444
@hotmail.com says...
I am getting a Run-time error '1004': Method 'Run' of
object '_Global' failed when running the same code that
works perfectly on NT 4.0, Excel 97. Forced to move to
Win 2000 with Excel 2000. Not an Excel or VB expert, so
the Microsoft Knowledgebase hit didn't help me.

I have a subrouting called DoIt:

Sub DoIt()
Sheet1.Initializer
Sheet1.loadup
Sheet1.copyover
Sheet1.titles
Sheet1.BuildIOPacektsChart
Sheet1.BuildIOPacketErrsChart
Sheet1.Conv2html
Sheet1.ToGifs
Sheet1.SaveHtml

End Sub

It is called from the Auto_Open function to run when the
file is executed:

Public Sub Auto_Open()
' Will automatically run when this app is started.

Run ("Sheet1.DoIt")

Application.DisplayAlerts = False
' Quit - close down Excel.
Application.Quit

End Sub

The failure happens on the line: Run ("Sheet1.DoIt")

I have absolutely no idea where to even start. Any help
would be greatly appreciated.

Thanks.
Ronj

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Range of Object _Global Failed Jeffrey Marks Charts and Charting in Excel 0 July 13th 11 07:33 PM
Method Add of object Validation Failed - please help Shokie New Users to Excel 1 July 10th 09 01:34 PM
Method 'Range' of object '_global' failed higherlimits Excel Discussion (Misc queries) 3 June 23rd 06 06:16 PM
runtime error 1004 method range of object '_global failed valdesd Excel Discussion (Misc queries) 2 October 6th 05 07:26 PM


All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"