johnisotank
Technical User
Hi All,
having a small problem getting my query to refresh. I know why it's happening but don't know how to solve it.
Here is my code:
It is failing because I have not specified the SQL Server password for the database. Problem is that when I manually put it in, it doesn't remember it when I re-open the workbook and I can't see anywhere to hard code the login details in VBA.
Hope someone can advise.
thanks
John
having a small problem getting my query to refresh. I know why it's happening but don't know how to solve it.
Here is my code:
Code:
Sub RefreshData()
Range("A3").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
End Sub
It is failing because I have not specified the SQL Server password for the database. Problem is that when I manually put it in, it doesn't remember it when I re-open the workbook and I can't see anywhere to hard code the login details in VBA.
Hope someone can advise.
thanks
John