ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macros (https://www.excelbanter.com/excel-programming/329079-macros.html)

Bunmi

macros
 
i have sort of created a very simple user form in excel and put a little vba
code in it. When i try running it, it comes up with a screen to do with
macros. Does this mean I need macros just to even preview what the form would
look like on its own? And if I do, how do I go about doing this? Thanks!

Charlie

macros
 
During development phase, if your cursor is in any sub or function of the
userform. such as CommandButton1_Click your macro should run when you click
the run button on the toolbar. Later add the line UserForm1.Show to the
Workbook_open sub.

Private Sub Workbook_Open()

UserForm1.Show

End Sub

Now the userform will open whenever you open the workbook, or during
development place the cursor in this sub before clicking the run button.


"bunmi" wrote:

i have sort of created a very simple user form in excel and put a little vba
code in it. When i try running it, it comes up with a screen to do with
macros. Does this mean I need macros just to even preview what the form would
look like on its own? And if I do, how do I go about doing this? Thanks!


david mcritchie

macros
 
You really should include the wording in "the little screen" but anyway, yes,
in order to run macros you must have Tools, Macro, Security, [x] Medium

Each time you open a file you will get a warning that the workbook has macros
"Macros may contain viruses, ... "
To which you reply with "Enable Macros" if you are familiar with the workbook
and want to run macros; otherwise, "Disable Macros" and you can look at the
macros, but not run them.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"bunmi" wrote...
i have sort of created a very simple user form in excel and put a little vba
code in it. When i try running it, it comes up with a screen to do with
macros. Does this mean I need macros just to even preview what the form would
look like on its own? And if I do, how do I go about doing this? Thanks!





All times are GMT +1. The time now is 05:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com