Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 542
Default Run time error - selecting range of cells.

Hi,
I'm developing some extra coding onto the end of Jack's Heirarchy macro in
Microsoft Project. The macro exports the project task information into Excel,
but doesn't format it too neatly. I am adding some code to complete some
formatting steps so that I do not have to format the spreadsheet every time i
run the macro.

I have come up against a little bit of an annoyance, though, and as I'm no
expert, would like some help in resolving it.

The first line of code I have added is:

Range("A:A").Select

The first time I run the code I get no errors (the code is run from MS
Project). The second time I run the code, I get the following error:

Run Time Error '1004':
Method 'Range' of Object '_Global' failed

When I debug, the first line of my code above is highlighted.

If I end, and run a third time, it runs ok. But every alternate time I run
the code, I get the same error.

I have selected the Excel object library reference, else it wouldn't run at
all.

Can anyone point me towards why I get this error?

Thanks
James.

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
Error when selecting date range. [email protected] Excel Programming 4 July 16th 08 04:39 PM
Runtime Error 1004 on selecting range MaltzMD Excel Programming 5 July 23rd 05 03:33 AM
How do you sum a range of more than 30 cells. I get error each time I try. Joseph Conaghan via OfficeKB.com Excel Worksheet Functions 5 March 21st 05 10:15 PM
1004 error when selecting a range Matt J[_2_] Excel Programming 9 July 3rd 04 10:05 PM
Error 1004 when selecting a range Matt J Excel Programming 1 July 3rd 04 06:50 PM


All times are GMT +1. The time now is 04:26 PM.

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"