How to insert txt macro to Excel

Ksiezniczka

New Member
Joined
Aug 15, 2011
Messages
1
Hi,

I have macro saved as txt file (coded in VBA) which I need to insert in Excel 2007.
How do I do it?:confused:

For some reason getting below once I pasted code into "Module 1" (under Modules in VBA)

Compile error: Constants, fixed-length strings, arrays, user-defined types and Declare statements not allowed as Public members of object modules

Many thanks for your hep!

PS. I'm super new to macros/VBA
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Welcome to the Board!

It sounds like you are putting your code in the right place, so there is probably a problem with your code.

Please post your code so we can help.
 
Upvote 0
Hej Ksiezniczko, tu ksiaze sie klania :-) podziel sie swoim kodem a byc moze ja bede mogl podzielis sie swoja wiedza :rolleyes:
 
Upvote 0

Forum statistics

Threads
1,224,559
Messages
6,179,517
Members
452,921
Latest member
BBQKING

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