LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default Assigning a query to a control button

Assuming you mean a pre-defined query that is already set
up within the workbook, refreshing it is quite simple -
add a command button and use code like this:

Sheets(WorksheetName).QueryTables(QueryName).Refre sh

QueryName would be the name given to the query table
range - i.e. right click somewhere in the query range and
choose "Data Range Properties", you will see the name in
there.

As for the second question, don't know...

-----Original Message-----
Is there a way to assign a control button to a query --so

that a user can click the button to make the query run
rather than going thru the menus to find the query.

and... another issue Im having, can I run a query on a

spreadsheet I have open?
.

 
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
assigning a macro to a button Darby Excel Discussion (Misc queries) 2 February 10th 06 05:05 PM
Assigning Macro's to control buttons. catdataman Excel Programming 3 December 23rd 03 05:16 PM
Assigning Multiple Macros to One ComboBox Control Tim Zych[_2_] Excel Programming 0 July 23rd 03 06:36 PM
Assigning Multiple Macros to One ComboBox Control Michael J. Malinsky Excel Programming 0 July 23rd 03 06:10 PM
Assigning the name of a userform/control to a changing string Brad Patterson Excel Programming 2 July 16th 03 11:00 PM


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