Hi!

I have an Excel workbook with some worksheets, each of them contains data that comes from a query (which was written using MSQuery). The worksheets are linked to the query!

I need to write a VB program that opens the workbook and refreshes the links. I tried to do that in so many ways, but all of them failed. Even when the program finished to execute without run-time errors, when I opened the workbook with Excel, I found that the workbook was not upgraded at all!

So far I have tried to use "Workbook1.RefreshLinks" and "Workbook1.Worksheets(1).Selection.QueryTable.Refresh" with many more variations on them.

Does anyone know another way to do that?

Thanks!