vb.net - Changing the location of an existing VBA Reference from C:\Windows\system32\ to a shared drive -


i've been trying while reference file loaded externally no avail.

to specific trying load "microsoft date , time picker control 6.0(sp4)" resides in c:\windows\system32\mscomct2.ocx

however people run macro containing element don't have "mscomct2.ocx" file on pcs thought move mscomct2.ocx shared location , reference code use shared 1 instead (so have access it)

i tried doing when trying load reference "browse" different location didn't load - because had in c:..

so thought ok... remove file c:\ can reference shared file. - deleted it. open workbook again , @ references - cant find "microsotft windows common controls-2.6.0(sp4)" - great! , proceed add manually browse shared drive. when 2 references of "microsotft windows common controls-2.6.0(sp4)" being added - 1 c:\(which not there) , 1 shared drive.

reference automatically added c:\

activex control rereferences always guid-based. vb ide shows current location of file listed in registry on computer, courtesy, doesn't matter says. control loaded wherever registered on user's computer.

that's key: control must registered on user's computer.

i must discourage doing you're trying do. might able concoct method load dll network location, presents no advantage on doing right thing(tm), , plenty of problems. right thing if need control, must distribute , register application, else does. , should install in recommended location (system32); not on network.

here's quick example of can go wrong: provide user app, , works control on network want it. user installs application happens need same control. app's installer sees control registered on user's computer, doesn't try add again. except particular app intended used when user not connected network. broke else's program.

the vb/vba architecture never intended support xcopy deployment. i'm know it's pain , these steps extremely inconvenient when you're trying deploy "macro". sadly, it's nature of beast. i'm sorry


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -