Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Sub before and after 'Get External Data"

Hi,

Is it possible to run a sub before and after a process of 'Get External
Data' ?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Sub before and after '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

"kleysonr" wrote:

Hi,

Is it possible to run a sub before and after a process of 'Get External
Data' ?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Sub before and after 'Get External Data"

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.

"FSt1" wrote:

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

"kleysonr" wrote:

Hi,

Is it possible to run a sub before and after a process of 'Get External
Data' ?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Sub before and after 'Get External Data"

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

"kleysonr" wrote:

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.

"FSt1" wrote:

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

"kleysonr" wrote:

Hi,

Is it possible to run a sub before and after a process of 'Get External
Data' ?

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
Adding to excel "table" using external data query Irvine, Dennis Excel Discussion (Misc queries) 0 February 15th 08 10:06 PM
Parameters In External ODBC Data Queries - "is one of" Michael R Excel Discussion (Misc queries) 0 October 2nd 07 10:52 AM
Excel Service error "cannot connect to external data source" Jooho Excel Discussion (Misc queries) 1 October 30th 06 11:08 PM
Remove "Refresh external data" from template Stéfan Robert Excel Programming 1 August 23rd 05 02:09 PM
excel: external data "data range properties" button dosent work HelpMuchNeeded Excel Programming 0 March 22nd 05 08:07 PM


All times are GMT +1. The time now is 01:31 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"