Hello, I just have a quick question. How would I make a report refresh data that comes from a query using a button?
I've already got the button placed in Excel, and I've got it's VB ready to go, I just need to know the syntax / command to refresh the report.
That "!" Exclamation mark, how do I put that in code to press that?
I know it sounds kind of stupid that I'm making a button ON the spreadsheet in order to replicate the same thing that another button does, but most of the users that are going to see this report won't have that actively on their toolbar.
is what I have so far
Can anyone help me out?
I've already got the button placed in Excel, and I've got it's VB ready to go, I just need to know the syntax / command to refresh the report.

That "!" Exclamation mark, how do I put that in code to press that?
I know it sounds kind of stupid that I'm making a button ON the spreadsheet in order to replicate the same thing that another button does, but most of the users that are going to see this report won't have that actively on their toolbar.
Code:
Private Sub CommandButton1_Click()
ActiveSheet.Range("A8").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
End Sub
is what I have so far
Can anyone help me out?