#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default 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!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default 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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
weird saving of a document with macros resulting with macros being transfered to the copy alfonso gonzales Excel Programming 0 December 12th 04 09:19 PM
Macros inside macros, and pasting into macro code. pagelocator[_2_] Excel Programming 1 November 24th 04 09:11 AM
convert lotus 123w macros to excel macros rpiescik[_2_] Excel Programming 1 September 19th 04 12:41 PM
convert lotus 123w macros to excel macros rpiescik Excel Programming 1 September 18th 04 01:35 PM
Macro Size Limit / open macros with macros? andycharger[_7_] Excel Programming 6 February 13th 04 02:00 PM


All times are GMT +1. The time now is 11:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"