O
OrientalPearl
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").Select
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
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").Select
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