Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88854

How do I create a status bar in vba while the user is waiting to update a web query table? [closed]

$
0
0

I am an amateur coder and I have the following web query table updates automatically launched in the activate section of the sheet. But I would like to be able to show a status bar of some sort so user does not think something is wrong. I have searched a bit but cannot find a vba resource to show me how, anyone has some sample code they can share to show a status bar of some sort?

Sub RefreshQueryAll()
Dim mssg As String
If IsInternetConnected Then
   Sheets("Bond Rates").ListObjects.Item("TBAFreddie").QueryTable.Refresh BackgroundQuery:=False
   Sheets("Bond Rates").ListObjects.Item("TBAFannie80").QueryTable.Refresh BackgroundQuery:=False
   Sheets("Bond Rates").ListObjects.Item("TBAFannie81").QueryTable.Refresh BackgroundQuery:=False
   Sheets("Bond Rates").ListObjects.Item("FLBond").QueryTable.Refresh BackgroundQuery:=False
   Sheets("Bond Rates").ListObjects.Item("MiamiHFA").QueryTable.Refresh BackgroundQuery:=False
   Sheets("Bond Rates").ListObjects.Item("LeeGrant").QueryTable.Refresh BackgroundQuery:=False
   Sheets("Bond Rates").ListObjects.Item("Lee2nd").QueryTable.Refresh BackgroundQuery:=False
   Sheets("Bond Rates").Cells.EntireColumn.AutoFit
Else
    mssg = "Internet is not connected, rates are not updated"
    MsgBox mssg
End If
End Sub

Viewing all articles
Browse latest Browse all 88854


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>