»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 07-11-2003, 11:16 AM   #1 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 7
MushMouse is on a distinguished road
Excel Macro works on some pcs & not others...

I have created an Excel macro that works on some PCs but not others. When it doesn't work I get a message telling me that there are not enough resources available. I've closed all other programs on these PCs, but it still gives me the same message. I've gone to TOOLS OPTIONS & made sure everything is the same. Any advice regarding how else I can find the problem would be much appreciated!

MushMouse is offline   Reply With Quote
Old 07-11-2003, 11:16 AM   #2 (permalink)
shahani
Guest
 
Posts: n/a
Question for Iron Duke Epidemic.
  Reply With Quote
Old 07-11-2003, 11:29 AM   #3 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
With these problems you have to look at several things

OS
IE Version
MS Office version

Are they the same on all platforms?
It maybe caused by a conflict that some code runs in some versions, and some do not.

Also are you using any large arrays or large datasets that may eat up memory?
Are you settings all of your objects to nothing after using them to get your memory back?
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 07-11-2003, 11:50 AM   #4 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 7
MushMouse is on a distinguished road
Thanks for your speedy response!

OS is XP
IE - do you mean internet explorer? That's 6.0.26
Microsoft Office is version 2002

However, the 3 PCs at the office are on a network.
The macro works on my PC at home (not on network) & on 1 of the PCs at the office

No large arrays of datasheets ( the sheet is about 20 columns by 100 rows. Would that be considered large?)

Regarding setting my objects to nothing - at the point when ny code is bombing, I'm still pretty close to the beginning of the code.
MushMouse is offline   Reply With Quote
Old 07-11-2003, 08:53 PM   #5 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
can you step through the code one step at time?
How long is the macro?

Can you see exactly which line its dying on?
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>

Last edited by vass0922; 07-11-2003 at 09:04 PM.
vass0922 is offline   Reply With Quote
Old 07-12-2003, 09:47 PM   #6 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 7
MushMouse is on a distinguished road
I can step through the code. It bombs when I am just cutting a 4 digit value from 1 cell & pasting it into another cell. I have about 20 lines of code where I'm just assigning character values to cells & if I comment out one line, it bombs on the next.

Here's a sample of the code that's bombing:
Range("G" & RowCounter - 1).Select
ActiveCell.FormulaR1C1 = ""
Range("G" & RowCounter).Select
ActiveCell.FormulaR1C1 = "Type"
Range("H" & RowCounter - 1).Select
ActiveCell.FormulaR1C1 = ""
Range("H" & RowCounter).Select
ActiveCell.FormulaR1C1 = "Finish"

The macro is about 400 lines long.
MushMouse is offline   Reply With Quote
Old 07-14-2003, 08:03 AM   #7 (permalink)
Registered User
 
Epidemic's Avatar
 
Join Date: Mar 2002
Posts: 400
Epidemic is on a distinguished road
Verify the active cell.

i suspect that you are trying to select rowcounter -1 is bombing because it is trying to pop your titles in row the negative first row or the zero row which is impossible. the copy you may be trying to work with in the office might have your cursor (active cell) on row one and the macro is designed to work on row two or later.

The copy that you run at home might have been saved with the cursor on a later row.

Just a guess
Epidemic is offline   Reply With Quote
Old 07-14-2003, 08:07 AM   #8 (permalink)
Registered User
 
Epidemic's Avatar
 
Join Date: Mar 2002
Posts: 400
Epidemic is on a distinguished road
Range("G" & RowCounter - 1).Select

On a personal note I used to use range select and active cell type commands but might I suggest that you look into the CELLS(rowcounter,7).select type of addressing I have found this to be a little more flexible. Not meaning to be critical I have just transitioned from your method and found Cells to be a bit better IMO.
Epidemic is offline   Reply With Quote
Old 07-14-2003, 01:07 PM   #9 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 7
MushMouse is on a distinguished road
When I stepped through the program line by line, the lowest value that rowcounter is getting at the point that this part of the macro starts executing is 7.

Also - thanks for the CELL suggestion - I'm going to try it!
I'm relatively new to macros & working in a vacuum (with no other programmers), so any tips are much appreciated!
MushMouse is offline   Reply With Quote
Old 07-14-2003, 07:58 PM   #10 (permalink)
Registered User
 
Epidemic's Avatar
 
Join Date: Mar 2002
Posts: 400
Epidemic is on a distinguished road
If you would like I am more than willing to try to assist.

send a copy of the macro and spreadsheet to me at vahlek@yahoo.com and I will take a look at it.

Standing where I am it is hard to try to figure it.

I promise that I will not steal your code. protect names or proprietary stuff and I will see about helping ya.
Epidemic is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 05:03 AM.