Тёмный

How To Programmatically Add Library References Using VBA 

Sigma Coding
Подписаться 46 тыс.
Просмотров 16 тыс.
50% 1

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 42   
@mohammedalboainain9826
@mohammedalboainain9826 Год назад
That was great work., the only issue is that we still need to manually add the "Visual Basic For Applications" reference!
@ilhankirbas8119
@ilhankirbas8119 4 года назад
I have a error message for line "Set vbProj = ThisWorkbook.VBProject" Error message is method 'vbproject' of object '_workbook' failed How can I fix it? Thanks for your help.
@SigmaCoding
@SigmaCoding 4 года назад
You need to enable macros in the workbook, or in other words disable Macro Security.
@jorgieporgie7866
@jorgieporgie7866 4 года назад
Hi @Sigma Coding, Thanks for taking the time to put together such a good video. To be able to programmatically add references the "Microsoft Visual Basic for Applications Extensibility" reference/library has to be enabled. How do you enable this reference/library without asking the user to do it manually? Also, the "Trust access to the VBA project object model" option in the "Trust Center Settings" has to be enabled as well. How do you get around this without asking the user to do it manually? Thanks,
@armaghankhan3938
@armaghankhan3938 8 месяцев назад
Thanks I was searching for the same
@willterpening8872
@willterpening8872 3 года назад
Thanks for the great code. Just for your information there are may references with a type of 0 rather than 1. For example, the Solver add-in that come with Excel and the VBIDE have types of 0. I am not sure what makes the difference however. +
@SigmaCoding
@SigmaCoding 3 года назад
Interesting, I never knew that so thank you for sharing. Maybe it has something to do with it being a "out of the package" add-in? That's the only thing I can think of at this point.
@danielantone6216
@danielantone6216 2 года назад
This is great thank you
@deepakagrawal465
@deepakagrawal465 4 года назад
Thanks for such awesome stuff. Just wanted to check if GUID, Major, Minor remain same across different PCs, so that, the VBA code becomes fully portable and ready to use on any machine (No need to ask users to check library references) ?
@hamidshah09
@hamidshah09 3 года назад
First, Thanks for shearing a valuable info. Second Ms Access is also supportin the same VBA, how to set project variable in access
@fabianafirmo1926
@fabianafirmo1926 5 лет назад
what is the name about the library to use the nomenclature VBIDE?
@SigmaCoding
@SigmaCoding 5 лет назад
Visual Basic Integrated Development Environment (VBIDE), that was my understanding since you're actually controlling the IDE.
@christianandreassen7990
@christianandreassen7990 4 года назад
Great video. Have been looking for such a tutorial for a long time! :-)
@SigmaCoding
@SigmaCoding 4 года назад
Glad you found it useful. :)
@ayaanansari4765
@ayaanansari4765 4 года назад
Sir how can solve StrConv object error in VBA when i run the code then will come error "Can't find the Object in library" Please help me know how can solve the error.
@karstengunner4676
@karstengunner4676 2 года назад
Thank u so much
@dildokafir5058
@dildokafir5058 5 лет назад
great. indeed handly.. can you make a video on "getobject" and "createobject" in vba.... thanks in advance
@SigmaCoding
@SigmaCoding 5 лет назад
I'll add it to the list. Thanks for the suggestion.
@romariodaniel1152
@romariodaniel1152 2 года назад
You are a the 🐐
@gexcel
@gexcel 5 лет назад
Very useful video! Thanks.
@SigmaCoding
@SigmaCoding 5 лет назад
Definitely a useful trick that can come in handy.
@marcesil78
@marcesil78 2 года назад
great!!! thank you very much... greetings from Paraguay
@borten
@borten 3 года назад
Very useful video! Thanks
@SigmaCoding
@SigmaCoding 3 года назад
Glad it was helpful!
@howto...inexcelbyexcelguru6522
@howto...inexcelbyexcelguru6522 4 года назад
Hi. It is fine if you know the library Name and path in your computer. But it is not usable if you prepare tool for somebody else and you do not know exact version. I just need to add Outlook library if it is not there implemented yet. So something more universal would be fine.
@SigmaCoding
@SigmaCoding 4 года назад
You could use the GUID to add it. It would add it automatically then. Also the file path is the same for all systems so you would need to use the more general user path.
@KhoaNguyen-fs6to
@KhoaNguyen-fs6to 3 года назад
Nice lesson! But, I would like to add library of System.Text.ASCIIEncoding to convert Hex to sjis. Thanks!
@ricardobarros83
@ricardobarros83 4 года назад
You are enable libraries with code to make the user's life easier, nevertheless we would have to enable VB for application extensibility first? That doesn't make sense to me...
@SigmaCoding
@SigmaCoding 4 года назад
Agreed, kind of defeats the purpose if the person is on a different version of Office than you are. However, in that case you could just use late binding instead.
@dparaguai
@dparaguai 3 года назад
Thanks buddy, this video helped me a lot :)
@HerculesSantosLoyola
@HerculesSantosLoyola 3 года назад
Ajudou muito, eu lhe agradeço de coração.
@OmkarUmbre
@OmkarUmbre 4 года назад
How to add our function into library?
@SigmaCoding
@SigmaCoding 4 года назад
Could you clarify what you're trying to do?
@scotolivera8207
@scotolivera8207 4 года назад
Thanks you sir a lot, very useful rly
@gencgorani
@gencgorani 4 года назад
thx indeed, been looking for this kind of tut, grat one. I'll subscribe :)
@SigmaCoding
@SigmaCoding 4 года назад
Thanks for the sub!
@josephbuckman158
@josephbuckman158 3 года назад
You are doing great.
@lbalkin
@lbalkin 4 года назад
good stuff, subscribed!
@nikunjrastogi1806
@nikunjrastogi1806 5 лет назад
I am not getting VB IDE in my Editor
@SigmaCoding
@SigmaCoding 5 лет назад
Were you getting a specific error or was it failing on a specific line of code?
@mscoder9902
@mscoder9902 4 года назад
Thanks
@SigmaCoding
@SigmaCoding 4 года назад
No problem
Далее
Making API Requests in VBA | XML
32:06
Просмотров 18 тыс.
Лучше одной, чем с такими
00:54
Просмотров 532 тыс.
Лиса🦊 УЖЕ НА ВСЕХ ПЛОЩАДКАХ!
00:24
How to Use the File System Object in VBA
25:42
Просмотров 9 тыс.
How to Use Class Interfaces in Excel VBA
20:16
Просмотров 80 тыс.
How to use Class Modules with the VBA Dictionary
14:30
The GIGA JUKE is dead.
28:02
Просмотров 60 тыс.
Making API Requests in VBA | JSON
26:17
Просмотров 43 тыс.
How to Schedule a Macro to Run at Certain Times
15:46
5 VBA Hacks Everyone Should Know in 2021
11:20
Просмотров 91 тыс.
Лучше одной, чем с такими
00:54
Просмотров 532 тыс.