vba - Disable Excel Workbook connections -


my excel spreadsheets work through shared folder. have created connections base files other files. example, customers file connected other documents need retrieve information , updated. thing is, when secondary file open cannot work on base file since open in [read only], tried connection properties , figured out whenever external data reference hasn't been updated can work base files if user refreshes file screwed, tried this:

private sub workbook_open()  activeworkbook.refreshall  application.wait (now + timevalue("0:00:05"))  thisworkbook.connections("test1").oledbconnection.enablerefresh = false  end sub 

i thought refresh query , disable connection won't [read only], i'm still getting it.

just randomly guessing - can try this:

activeworkbook.exclusiveaccess 

instead of:

thisworkbook.connections("test1").oledbconnection.enablerefresh = false


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -