URgent!!!!!!!!!! Macros in Excel give aan error

G

Guest

H

I wrote a macro in excel "sheet1" .What this macro does is to export data from one Excel "sheet2" to "Sheet1". It was working fine in all systems. till 2 days back. But now it works in some and it doesn't work in some systems.

It gives an error saying ""Runtime-Error '9' Subscript Out of Range."

At this line i am actually activating the sheet from whcihc it has to copy. Ie " Windows("Sheet2.xls").Activate

Some one pls help
 
R

Raymond Lewallen

Anamika,

Sounds like an Add-In or a file within the "XLStart" folder, or even the
"personal.xls" file. Are you familiar with locating each file and
eliminating these from the MS-Excel environment? Alternatively, you may
like to start Excel as follows:
"C:\Program Files\Microsoft Office\Office\Excel.exe" /s
To ignore any start-up files. If the error is not present using the "/s"
switch, then you can be sure that the problem is Add-In/Startup related.

HTH,

Raymond Lewallen

PS. There is a specific newsgroup out there for Excel related questions.

Anamika said:
Hi

I wrote a macro in excel "sheet1" .What this macro does is to export data
from one Excel "sheet2" to "Sheet1". It was working fine in all systems.
till 2 days back. But now it works in some and it doesn't work in some
systems.
It gives an error saying ""Runtime-Error '9' Subscript Out of Range." .

At this line i am actually activating the sheet from whcihc it has to
copy. Ie " Windows("Sheet2.xls").Activate"
 
R

Raymond Lewallen

What version of Excel are you using?

The XLStart folder should be in c:\program files\microsoft
office\Office\XLStart. Try cleaning that out. Did you try starting Excel
from the command prompt using the /s option?

Raymond Lewallen

Ananmika said:
Hi

I am not sure where i can find the files u hvae specified. I tried opening
the excel application from C:\Program Files\Excel.exe But it does give the
same error
 
G

Guest

H

I checked XLStart folder . It is empty. Also when i try to run C:\Program Files\Microsoft Office\Office\Excel.exe /s from CMD it says command or batch file not exist
 
R

Raymond Lewallen

What version of Excel are you using?

Ananmika said:
Hi

I checked XLStart folder . It is empty. Also when i try to run C:\Program
Files\Microsoft Office\Office\Excel.exe /s from CMD it says command or batch
file not exists
 
R

Raymond Lewallen

Also, try putting quotes around it... "C:\Program Files\Microsoft
Office\Office\Excel.exe" /s


Ananmika said:
Hi

I checked XLStart folder . It is empty. Also when i try to run C:\Program
Files\Microsoft Office\Office\Excel.exe /s from CMD it says command or batch
file not exists
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top