Message box to appear when opeing Excel file

hafiff

Board Regular
Joined
Feb 5, 2008
Messages
65
Hi everyone,
I would like to have a message box to appear when Excel workbook is open. The message is to let the user to "Fill in only highlighted cells" because the remaining cells will be password protected so they don't freak out when trying to fill in un-highlighted cell and it does not work.

I know how to write the code on VBA, but the problem is that I need to convert the file to from .xlsx to .xlsm (macro based).

Is that away that the Excel file is saved as a normal .xlsx file?

Many thanks for your input or any options you can give me.
HA
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
If you want to have code in your workbook, you'll need to save as .xlsm or .xlsb (I prefer the latter because it compresses very well).

Saving as .xlsx will strip the code out.
 
Upvote 0
Hi everyone,
I would like to have a message box to appear when Excel workbook is open. The message is to let the user to "Fill in only highlighted cells" because the remaining cells will be password protected so they don't freak out when trying to fill in un-highlighted cell and it does not work.

I know how to write the code on VBA, but the problem is that I need to convert the file to from .xlsx to .xlsm (macro based).

Is that away that the Excel file is saved as a normal .xlsx file?

Many thanks for your input or any options you can give me.
HA

After you have written the code, do a SaveAs and save the file with a .xlsm extension. Files with .xlsx extensions cannot contain macros.
 
Upvote 0
Using Excel 2013 to set .xlsm as the default save option.
On your menu bar.
Choose File
Choose Options
Choose Save
Choose Save file in Macro Enabled
 
Upvote 0
How about saving the workbook as .xlsm, but I don't want anyone to be able to view, edit, and run the macro?

Thanks,
ha
 
Upvote 0
You can set the macro as Private or add a declaration to it like:

Sub Macro1(Optional KeepOut As Byte)

Both of which will keep it from appearing in the macro list. You'll probably want to protect the VBA Project as well (Tools-->Options).
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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