Sub before and after 'Get External Data"

  • Thread starter Thread starter kleysonr
  • Start date Start date
K

kleysonr

Hi,

Is it possible to run a sub before and after a process of 'Get External
Data' ?
 
hi
not sure if i understand you correctly but the "get external data" can be
set up to run before and after. assuming that the MS Query is allready set at
sheet1 A1...

sub runitnow()

call RunFirstSub

Sheets("sheet1").range("A1").Querytable.Refresh _
Backgroundquery:= False

Car RunSecondSub

end sub

is this what you want??
regards
FSt1
 
This one can be a solution.

But what i want is:

I configured excel to get external data in a Access Database. So, before
Excel run the QueryTable.Refresh i need that it run a sub, and after the
QueryTable.Refresh process end i need run another sub. Like events
QueryTable.Refresh.Before or QueryTable.Refresh.After.
 
hi
to my knowlege, there isn't a before refresh event or after refresh event.
i have a number of macros that manipulate data after the refresh and i
always just incorperated the refresh and manipulation into 1 macro.
in your example the before refresh macro would be triggered when you
refresh, then the refresh and the after refresh macro would be triggered
after the refresh was complete almost as if it was one macro like the example
i posted.
do you need to pause the macro at some point?

Regards
FSt1
 

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

Back
Top