Thread: Query Help
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leanne Leanne is offline
external usenet poster
 
Posts: 87
Default Query Help

Never mind! I solved it myself! There is a first time for everything!

"Leanne" wrote:

I have built a query and have the following code on a command button to
refresh the query.
Private Sub CommandButton1_Click()
Sheets("Invoice Due").Activate
Range("A7").QueryTable.Refresh BackgroundQuery:=False
MsgBox "Refresh complete"
End Sub

When I run this it goes through the motions and asks for the parameters set
and then i get the Refresh complete however I am not getting any infromation
returned. When I run the report independantly of this code/button I do get
the information.

Can anyone help me identify what is going wrong please.