![]() |
How to do this with VBA
-I use a file .dll in my program: Alt+F11 - Tools/References/Browse... find
the path of dll and click OK. -How to do this with some code in VBA Thanks |
How to do this with VBA
Hello
ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" Depending on your Excel version, you may have to check for Security options (Tools, Macro, Security), to trust your code. HTH Cordially Pascal "voda" a écrit dans le message de news: ... -I use a file .dll in my program: Alt+F11 - Tools/References/Browse... find the path of dll and click OK. -How to do this with some code in VBA Thanks |
How to do this with VBA
Hello!
Thanks for your anwsers. I use your code but get error:"Run-time error '429'. ActiveX component can't create object" Help me "papou" wrote: Hello ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" Depending on your Excel version, you may have to check for Security options (Tools, Macro, Security), to trust your code. HTH Cordially Pascal "voda" a écrit dans le message de news: ... -I use a file .dll in my program: Alt+F11 - Tools/References/Browse... find the path of dll and click OK. -How to do this with some code in VBA Thanks |
How to do this with VBA
I put this code in Thisworkbook use event Workbook_Open.
"papou" wrote: Voda Where did you place the code? HTH Cordially Pascal "voda" a écrit dans le message de news: ... Hello! Thanks for your anwsers. I use your code but get error:"Run-time error '429'. ActiveX component can't create object" Help me "papou" wrote: Hello ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" Depending on your Excel version, you may have to check for Security options (Tools, Macro, Security), to trust your code. HTH Cordially Pascal "voda" a écrit dans le message de news: ... -I use a file .dll in my program: Alt+F11 - Tools/References/Browse... find the path of dll and click OK. -How to do this with some code in VBA Thanks |
How to do this with VBA
Try and place the code in a standard module and invoke it from the
workbook_open event: Private Sub Workbook_open() Macro1 End Sub In a module: Sub Macro1() ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" End Sub HTH Cordially Pascal "voda" a écrit dans le message de news: ... I put this code in Thisworkbook use event Workbook_Open. "papou" wrote: Voda Where did you place the code? HTH Cordially Pascal "voda" a écrit dans le message de news: ... Hello! Thanks for your anwsers. I use your code but get error:"Run-time error '429'. ActiveX component can't create object" Help me "papou" wrote: Hello ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" Depending on your Excel version, you may have to check for Security options (Tools, Macro, Security), to trust your code. HTH Cordially Pascal "voda" a écrit dans le message de news: ... -I use a file .dll in my program: Alt+F11 - Tools/References/Browse... find the path of dll and click OK. -How to do this with some code in VBA Thanks |
How to do this with VBA
I already followed your instruction, but the result is not consistent.
Sometimes it can run, and it can not in some other times. Can I use this code: Shell "regsvr32 -s C:\Mydll.dll"? Why get error the following code? shell "regsvr32 -s ThisWorbook.Path & "\" & "Mydll.dll"? "papou" wrote: Try and place the code in a standard module and invoke it from the workbook_open event: Private Sub Workbook_open() Macro1 End Sub In a module: Sub Macro1() ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" End Sub HTH Cordially Pascal "voda" a écrit dans le message de news: ... I put this code in Thisworkbook use event Workbook_Open. "papou" wrote: Voda Where did you place the code? HTH Cordially Pascal "voda" a écrit dans le message de news: ... Hello! Thanks for your anwsers. I use your code but get error:"Run-time error '429'. ActiveX component can't create object" Help me "papou" wrote: Hello ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" Depending on your Excel version, you may have to check for Security options (Tools, Macro, Security), to trust your code. HTH Cordially Pascal "voda" a écrit dans le message de news: ... -I use a file .dll in my program: Alt+F11 - Tools/References/Browse... find the path of dll and click OK. -How to do this with some code in VBA Thanks |
How to do this with VBA
Voda
You don't say what error messages you get. Anyway amend this: shell "regsvr32 -s" & ThisWorbook.Path & "\Mydll.dll"? HTH Cordially Pascal "voda" a écrit dans le message de news: ... I already followed your instruction, but the result is not consistent. Sometimes it can run, and it can not in some other times. Can I use this code: Shell "regsvr32 -s C:\Mydll.dll"? Why get error the following code? shell "regsvr32 -s ThisWorbook.Path & "\" & "Mydll.dll"? "papou" wrote: Try and place the code in a standard module and invoke it from the workbook_open event: Private Sub Workbook_open() Macro1 End Sub In a module: Sub Macro1() ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" End Sub HTH Cordially Pascal "voda" a écrit dans le message de news: ... I put this code in Thisworkbook use event Workbook_Open. "papou" wrote: Voda Where did you place the code? HTH Cordially Pascal "voda" a écrit dans le message de news: ... Hello! Thanks for your anwsers. I use your code but get error:"Run-time error '429'. ActiveX component can't create object" Help me "papou" wrote: Hello ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" Depending on your Excel version, you may have to check for Security options (Tools, Macro, Security), to trust your code. HTH Cordially Pascal "voda" a écrit dans le message de news: ... -I use a file .dll in my program: Alt+F11 - Tools/References/Browse... find the path of dll and click OK. -How to do this with some code in VBA Thanks |
How to do this with VBA
Thanks
This code : shell "regsvr32 -s" & ThisWorbook.Path & "\Mydll.dll"? is good. What 's difference of this code: ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" and shell "regsvr32 -s C:\Mydll.dll"? "papou" wrote: Voda You don't say what error messages you get. Anyway amend this: shell "regsvr32 -s" & ThisWorbook.Path & "\Mydll.dll"? HTH Cordially Pascal "voda" a écrit dans le message de news: ... I already followed your instruction, but the result is not consistent. Sometimes it can run, and it can not in some other times. Can I use this code: Shell "regsvr32 -s C:\Mydll.dll"? Why get error the following code? shell "regsvr32 -s ThisWorbook.Path & "\" & "Mydll.dll"? "papou" wrote: Try and place the code in a standard module and invoke it from the workbook_open event: Private Sub Workbook_open() Macro1 End Sub In a module: Sub Macro1() ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" End Sub HTH Cordially Pascal "voda" a écrit dans le message de news: ... I put this code in Thisworkbook use event Workbook_Open. "papou" wrote: Voda Where did you place the code? HTH Cordially Pascal "voda" a écrit dans le message de news: ... Hello! Thanks for your anwsers. I use your code but get error:"Run-time error '429'. ActiveX component can't create object" Help me "papou" wrote: Hello ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" Depending on your Excel version, you may have to check for Security options (Tools, Macro, Security), to trust your code. HTH Cordially Pascal "voda" a écrit dans le message de news: ... -I use a file .dll in my program: Alt+F11 - Tools/References/Browse... find the path of dll and click OK. -How to do this with some code in VBA Thanks |
How to do this with VBA
Hi voda
This code : shell "regsvr32 -s" & ThisWorbook.Path & "\Mydll.dll"? is good Ok, thank you for your feedback. What 's difference of this code: ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" and shell "regsvr32 -s C:\Mydll.dll"? They do very different actions: The first one operates in Excel only, by adding a reference to the Excel VBA Projet of the workbook The second operates in the Windows operating system, it registers a new DLL into the system. HTH Cordially Pascal "voda" a écrit dans le message de news: ... Thanks .. What 's difference of this code: ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" and shell "regsvr32 -s C:\Mydll.dll"? "papou" wrote: Voda You don't say what error messages you get. Anyway amend this: shell "regsvr32 -s" & ThisWorbook.Path & "\Mydll.dll"? HTH Cordially Pascal "voda" a écrit dans le message de news: ... I already followed your instruction, but the result is not consistent. Sometimes it can run, and it can not in some other times. Can I use this code: Shell "regsvr32 -s C:\Mydll.dll"? Why get error the following code? shell "regsvr32 -s ThisWorbook.Path & "\" & "Mydll.dll"? "papou" wrote: Try and place the code in a standard module and invoke it from the workbook_open event: Private Sub Workbook_open() Macro1 End Sub In a module: Sub Macro1() ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" End Sub HTH Cordially Pascal "voda" a écrit dans le message de news: ... I put this code in Thisworkbook use event Workbook_Open. "papou" wrote: Voda Where did you place the code? HTH Cordially Pascal "voda" a écrit dans le message de news: ... Hello! Thanks for your anwsers. I use your code but get error:"Run-time error '429'. ActiveX component can't create object" Help me "papou" wrote: Hello ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" Depending on your Excel version, you may have to check for Security options (Tools, Macro, Security), to trust your code. HTH Cordially Pascal "voda" a écrit dans le message de news: ... -I use a file .dll in my program: Alt+F11 - Tools/References/Browse... find the path of dll and click OK. -How to do this with some code in VBA Thanks |
How to do this with VBA
Hi papou!
Thank you very much for your answers. I hope your helps for me in future . (I 'm not an English) "papou" wrote: Hi voda This code : shell "regsvr32 -s" & ThisWorbook.Path & "\Mydll.dll"? is good Ok, thank you for your feedback. What 's difference of this code: ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" and shell "regsvr32 -s C:\Mydll.dll"? They do very different actions: The first one operates in Excel only, by adding a reference to the Excel VBA Projet of the workbook The second operates in the Windows operating system, it registers a new DLL into the system. HTH Cordially Pascal "voda" a écrit dans le message de news: ... Thanks .. What 's difference of this code: ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" and shell "regsvr32 -s C:\Mydll.dll"? "papou" wrote: Voda You don't say what error messages you get. Anyway amend this: shell "regsvr32 -s" & ThisWorbook.Path & "\Mydll.dll"? HTH Cordially Pascal "voda" a écrit dans le message de news: ... I already followed your instruction, but the result is not consistent. Sometimes it can run, and it can not in some other times. Can I use this code: Shell "regsvr32 -s C:\Mydll.dll"? Why get error the following code? shell "regsvr32 -s ThisWorbook.Path & "\" & "Mydll.dll"? "papou" wrote: Try and place the code in a standard module and invoke it from the workbook_open event: Private Sub Workbook_open() Macro1 End Sub In a module: Sub Macro1() ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" End Sub HTH Cordially Pascal "voda" a écrit dans le message de news: ... I put this code in Thisworkbook use event Workbook_Open. "papou" wrote: Voda Where did you place the code? HTH Cordially Pascal "voda" a écrit dans le message de news: ... Hello! Thanks for your anwsers. I use your code but get error:"Run-time error '429'. ActiveX component can't create object" Help me "papou" wrote: Hello ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" Depending on your Excel version, you may have to check for Security options (Tools, Macro, Security), to trust your code. HTH Cordially Pascal "voda" a écrit dans le message de news: ... -I use a file .dll in my program: Alt+F11 - Tools/References/Browse... find the path of dll and click OK. -How to do this with some code in VBA Thanks |
How to do this with VBA
Hello Voda
Glad to help! I hope your helps for me in future . May be not only me, but somebody from this newsgroup will try, I am sure (I 'm not an English) Neither am I. Cordially Pascal "voda" a écrit dans le message de news: ... Hi papou! Thank you very much for your answers. I hope your helps for me in future . (I 'm not an English) "papou" wrote: Hi voda This code : shell "regsvr32 -s" & ThisWorbook.Path & "\Mydll.dll"? is good Ok, thank you for your feedback. What 's difference of this code: ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" and shell "regsvr32 -s C:\Mydll.dll"? They do very different actions: The first one operates in Excel only, by adding a reference to the Excel VBA Projet of the workbook The second operates in the Windows operating system, it registers a new DLL into the system. HTH Cordially Pascal "voda" a écrit dans le message de news: ... Thanks .. What 's difference of this code: ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" and shell "regsvr32 -s C:\Mydll.dll"? "papou" wrote: Voda You don't say what error messages you get. Anyway amend this: shell "regsvr32 -s" & ThisWorbook.Path & "\Mydll.dll"? HTH Cordially Pascal "voda" a écrit dans le message de news: ... I already followed your instruction, but the result is not consistent. Sometimes it can run, and it can not in some other times. Can I use this code: Shell "regsvr32 -s C:\Mydll.dll"? Why get error the following code? shell "regsvr32 -s ThisWorbook.Path & "\" & "Mydll.dll"? "papou" wrote: Try and place the code in a standard module and invoke it from the workbook_open event: Private Sub Workbook_open() Macro1 End Sub In a module: Sub Macro1() ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" End Sub HTH Cordially Pascal "voda" a écrit dans le message de news: ... I put this code in Thisworkbook use event Workbook_Open. "papou" wrote: Voda Where did you place the code? HTH Cordially Pascal "voda" a écrit dans le message de news: ... Hello! Thanks for your anwsers. I use your code but get error:"Run-time error '429'. ActiveX component can't create object" Help me "papou" wrote: Hello ThisWorkbook.VBProject.References.AddFromFile "C:\Mydll.dll" Depending on your Excel version, you may have to check for Security options (Tools, Macro, Security), to trust your code. HTH Cordially Pascal "voda" a écrit dans le message de news: ... -I use a file .dll in my program: Alt+F11 - Tools/References/Browse... find the path of dll and click OK. -How to do this with some code in VBA Thanks |
All times are GMT +1. The time now is 02:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com