plungerman
Programmer
- Apr 29, 2013
- 5
Nice to belong to such a group. I have been scanning your pages for a long time now.
I have an Excel workbook that is linked to an Access table. The table link is set to refresh when the workbook opens.
This works fine once I used;
ActiveWorkbook.Connections("tableReports_2").OLEDBConnection.Refresh
The worksheet is protected so that some columns cannot be changed as they are locked.
Problem is that when the workbook opens it insists on warning the user with a message about Protection.
NO warning when this runs from a command button, ONLY when the file is opening.
The code is as follows;
Public Sub Workbook_Open()
ActiveSheet.Unprotect
'Refresh code ' plus all the Do events and time delay you can imagine.
ActiveSheet.Protect ' Same as stated in other threads.
Because the file is opening somthing is telling the refresh to dialog the user.
We cannot have this, we want to refresh the link and re-protect the sheet.
I await your reply and comments on improving my threading format.
I have an Excel workbook that is linked to an Access table. The table link is set to refresh when the workbook opens.
This works fine once I used;
ActiveWorkbook.Connections("tableReports_2").OLEDBConnection.Refresh
The worksheet is protected so that some columns cannot be changed as they are locked.
Problem is that when the workbook opens it insists on warning the user with a message about Protection.
NO warning when this runs from a command button, ONLY when the file is opening.
The code is as follows;
Public Sub Workbook_Open()
ActiveSheet.Unprotect
'Refresh code ' plus all the Do events and time delay you can imagine.
ActiveSheet.Protect ' Same as stated in other threads.
Because the file is opening somthing is telling the refresh to dialog the user.
We cannot have this, we want to refresh the link and re-protect the sheet.
I await your reply and comments on improving my threading format.