LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Works at one place but not another?

Hello everyone,

Basically, a sub-routine 'ResetImportSection' is called twice in the
VBA code. However it works well for the first one but fires a 'runtime
error 1004: Select method of Range class failed.' at the second place.
ResetImportSection is used to tidy up in case of an import failure. It
is called if the import file is corrupted somehow in the 1st instance
and it works fine. The other piece of code also calls it when too many
days are involved(at most 7 days). That's where it crashs over the
following stagement within ResetImportSection:

'Select the range to be cleared
masterworkbook.Sheets("Shipper").Range("G8:G12").S elect

But it continues to run(since I can see the pane is cleared as desired)
if I click the 'continue' button afterwards.

Can why does it crash when it is invoked in the secone case? Thanks go
to any posts.

Regards
Frank

 
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
No place for sum [email protected] Excel Worksheet Functions 4 March 28th 07 02:52 AM
Excel Addin works that works on a template workbook s.jay_k Excel Programming 0 February 15th 06 07:31 PM
This place ROX!! brodiemac Excel Discussion (Misc queries) 0 December 22nd 05 03:21 PM
it works, it doesn work, its works....and so on. Naz Excel Programming 6 September 30th 05 01:52 PM
How do I convert works file to excel without works software? CatMB Excel Discussion (Misc queries) 1 June 21st 05 04:12 PM


All times are GMT +1. The time now is 05:42 PM.

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"