Macro works fine on local drive, will not work on network drive?

Ry001

New Member
Joined
Feb 16, 2015
Messages
3
I have a workbook (located on my local drive) with a rather simple macro setup that unlocks a sheet upon the workbook opening, refreshes the data, then locks the sheet again. The sheet it unlocks is called "SignSheet" and it refreshes the data from a workbook called "signsheet" on another network drive.

This Workbook
Private Sub Workbook_Open()
RefreshData
End Sub

Macro
Sub RefreshData()
'
' RefreshData Macro
'
Application.ScreenUpdating = False
Sheets("SignSheet").Unprotect Password:="Password"
ActiveWorkbook.Connections("signsheet").Refresh
Sheets("SignSheet").Protect _
Password:="Password", _
UserInterfaceOnly:=True, _
AllowFiltering:=True, _
AllowSorting:=True, _
AllowUsingPivotTables:=True
End Sub

This works flawlessly until I tried to copy the workbook to another shared drive where other users could have access. The next day when I opened it, I received a message saying "You cannot refresh data from a protected table or sheet, please unprotect ...", so why is the macro no longer telling the sheet to unprotect itself upon opening the workbook. It worked perfect before copying it over to a network drive ... what changed?

I'm a newbie at this, so sorry if this is a simple answer ... but I couldn't find anything on the boards about this. Thanks.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top