Refresh Button

philiplynch

New Member
Joined
Aug 20, 2007
Messages
11
I have an excel spreadsheet page that takes data from one page to come up with calculations on another. Anyway, you have to Right-Click and press Refresh Data. Is there a way to create a button that just says Refresh or Update or whatever that does the same as Refresh Data, but is there as a easy to see and click button. Thanks for your help in advance.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Create a command button from the "Control Toolbox" Toolbar.

right click it, view code.

you will see some code there already, something like

Code:
Private Sub CommandButton1_Click()

End Sub

Put these lines between those 2 lines.

Code:
Sheets("sheet1").Range("A1").QueryTable.Refresh

Adjust sheetname and A1 to suit.
 
Upvote 0
View - Toolbars....
if not on that list, select customize - and put a check next to "Control Toolbox"
 
Upvote 0
From Excel Help:
"Display the Control Toolbox: point to Toolbars on the View menu, and then click Control Toolbox."
 
Upvote 0
I tried to have things automatically refresh, but windows keeps having a message about how a macro could contain viruses, and this is going to other people, and I dont want them to see that message.

Is there a way to create a Refresh button? There would be a standard button that when clicked, would refresh the table and doesn't use macros. Thanks.
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,943
Members
448,534
Latest member
benefuexx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top