properties - Designate Excel Data Connection ReadOnly -


i have excel file data connection excel source referenced several other reports. data connection should read only, cannot seem setup properties - whenever source file open somewhere else, data connection attempts open source read-write. have tried enter readonly=0,readonly=true, , readonly=1, nothing seems effective.

when source file opens, seems interrupt macro executes timer. connection string data connection (with substituted paths):

dsn=excel files;dbq="source file path";defaultdir="directory path";driverid=1046;maxbuffersize=2048;pagetimeout=5; 

i copy workbooks source workbook use them in. use following code (with readonly:=true):

'open workbook application.displayalerts = false application.enableevents = false workbooks.open ("location"), updatelinks:=0, readonly:=true  'copy worksheet workbooks(sourceworkbook).worksheets(sourcesheet).copy _  after:=workbooks(destinationworkbook).worksheets(workbooks(destinationworkbook).worksheets.count)  'close source workbook       workbooks(sourceworkbook).close application.enableevents = true application.displayalerts = true 

hope helps


Comments

Popular posts from this blog

ios - UITEXTFIELD InputView Uipicker not working in swift -

Hatching array of circles in AutoCAD using c# -