excelbytes
Active Member
- Joined
- Dec 11, 2014
- Messages
- 251
- Office Version
- 365
- Platform
- Windows
I have a table called "Data" on a worksheet called "Goals For The Week" and I want the code to refresh the table. I am using:
Sub Workbook_RefreshAll()
Worksheets("Goals For The Week").ListObjects("Data").Refresh
End Sub
The only problem I have is that one of the columns has wrapped text, and when I run this code it adjusts the column width to fit the text and not wrap it, so that column becomes quite wide.
I was using this code:
Sub Workbook_RefreshAll()
ActiveWorkbook.RefreshAll
End Sub
But had the same result. Any suggestions to refresh the table without altering the column Width? Or do I just add a line of code after the refresh to adjust the column width back to what it was? If so, what is that code?
Sub Workbook_RefreshAll()
Worksheets("Goals For The Week").ListObjects("Data").Refresh
End Sub
The only problem I have is that one of the columns has wrapped text, and when I run this code it adjusts the column width to fit the text and not wrap it, so that column becomes quite wide.
I was using this code:
Sub Workbook_RefreshAll()
ActiveWorkbook.RefreshAll
End Sub
But had the same result. Any suggestions to refresh the table without altering the column Width? Or do I just add a line of code after the refresh to adjust the column width back to what it was? If so, what is that code?