Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Everthing worked fine and then.......

Hello,
Thanks to information found on this group and other web sources I was
able to write my first Excel VBA program and it worked for several
months and then a problem arose.

A breif description of the program; Using Excel as a database to
retrieve material costs. The user clicks on a desktop shortcut and a
workbook loads behind a full screen user form. User selects material
type, gauge, and sheet size from drop down boxes and clicks a command
button to get pricing from up to (10) different vendors.

The workbook w/ the code resides on my machine (Win XP pro). Two
networked machines can access the code via a shortcut on their
desktops. Boss #1 has Win XP Home and boss #2 is running Win 98se ( due
to legacy software that will not run on XP). Boss #1 is working fine
but boss #2 now gets a "run-time error 9" "subscript out of range" when
he clicks the command button to get pricing.

Since the problem only affects 1 computer and even it could run the
program for several months, I don't know where to begin to solve this
problem.

TIA,
Tinknocker

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Everthing worked fine and then.......

Just a complete guess.

I'm betting that you have code like:

windows("book1").activate
or
workbooks("book1").activate

Depending on a windows setting (not a version of windows, though), this may work
fine--or not.

Make sure you include the extension and those kinds of lines will work no matter
the windows setting.

windows("book1.xls").activate
or
workbooks("book1.xls").activate

======
If this doesn't help, you should post the snippet of code that causes the
problem. In general, subscript out of range means that you're trying to do
something to something that doesn't exist. Lots of times, it's caused by typos:

worksheets("shete1").select

(But that kind of typo wouldn't explain your problem.)

tinknocker wrote:

Hello,
Thanks to information found on this group and other web sources I was
able to write my first Excel VBA program and it worked for several
months and then a problem arose.

A breif description of the program; Using Excel as a database to
retrieve material costs. The user clicks on a desktop shortcut and a
workbook loads behind a full screen user form. User selects material
type, gauge, and sheet size from drop down boxes and clicks a command
button to get pricing from up to (10) different vendors.

The workbook w/ the code resides on my machine (Win XP pro). Two
networked machines can access the code via a shortcut on their
desktops. Boss #1 has Win XP Home and boss #2 is running Win 98se ( due
to legacy software that will not run on XP). Boss #1 is working fine
but boss #2 now gets a "run-time error 9" "subscript out of range" when
he clicks the command button to get pricing.

Since the problem only affects 1 computer and even it could run the
program for several months, I don't know where to begin to solve this
problem.

TIA,
Tinknocker


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Everthing worked fine and then.......

may be a solution to your excel problem, but this is what i would do anyway.
download a copy of microsoft virtual pc. buy yourself another copy of xp and
install it . install virtual pc and then install win98 on the virtual pc. when
he needs the legacy app, he can boot into the virtual 98 os and run it.

just make sure the pc is powerful enough to run both os's at the same time. i've
even ghosted an image to the virtual pc so i didn't have to install all of the
apps.

http://www.microsoft.com/windows/virtualpc/default.mspx

--


Gary


"tinknocker" wrote in message
ps.com...
Hello,
Thanks to information found on this group and other web sources I was
able to write my first Excel VBA program and it worked for several
months and then a problem arose.

A breif description of the program; Using Excel as a database to
retrieve material costs. The user clicks on a desktop shortcut and a
workbook loads behind a full screen user form. User selects material
type, gauge, and sheet size from drop down boxes and clicks a command
button to get pricing from up to (10) different vendors.

The workbook w/ the code resides on my machine (Win XP pro). Two
networked machines can access the code via a shortcut on their
desktops. Boss #1 has Win XP Home and boss #2 is running Win 98se ( due
to legacy software that will not run on XP). Boss #1 is working fine
but boss #2 now gets a "run-time error 9" "subscript out of range" when
he clicks the command button to get pricing.

Since the problem only affects 1 computer and even it could run the
program for several months, I don't know where to begin to solve this
problem.

TIA,
Tinknocker



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
Excel links & SharePoint 3.0 (worked fine with SharePoint 2.0) ScottFisher2004 Excel Discussion (Misc queries) 0 November 10th 08 03:26 PM
Excel won't start. Previously worked fine Don T. Excel Discussion (Misc queries) 6 December 11th 06 12:54 AM
Macro fine Run fine from Select but not from KB Shortcut? [email protected] Excel Discussion (Misc queries) 8 August 31st 06 02:06 AM
What is wrong with this IF formula, it worked fine for a while? AC man Excel Discussion (Misc queries) 4 January 10th 06 01:19 AM
Ignoring everthing after a hypen Steve Excel Discussion (Misc queries) 5 September 9th 05 08:37 PM


All times are GMT +1. The time now is 07:23 AM.

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

About Us

"It's about Microsoft Excel"