VBA own codes library

Kamolga

Well-known Member
Joined
Jan 28, 2015
Messages
1,185
Hi,

I just tried some kind of Add-in (VBA Code, free test version) that provides some help when writing code (I would use less than 5% of it, and the way to start a class in really great by the way).

The only feature I love and would like to do on my own is the possibility to add what they call a fragment, a piece of code I often use.
For example,
Code:
'Last Row
Dim sh as workseet
Dim lr as long
lr=sh.cells(sh.[LEFT][COLOR=#3D3D3D][FONT="Courier New"]Rows.Count, "A").End(xlUp).Row[/FONT][/COLOR][/LEFT]
Through a menu in a VBA toolbar, I can access this fragment very easily.

Is there a way to build such bar/menu on my own? I would save it on onedrive to be accessible on different computers.

I guess it is not easy, but if you could give me some guidance on the steps/language (?) to take to build a toolbar in VBA that could paste pieces of codes (maybe textfiles saved on onedrive), that would be really great. Tanks in advance
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top