Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Macro Pop Up

I am looking for a way to create a pop up that would ask the user if
they would like to run a macro.

The worksheet has several macros that will alter the sheet in several
ways, either by saving as a new file or altering the formatting.
Users will only want to run one of these macros at any one time. I'm
trying to find a reference that would show me how to create a pop up
window that would list the available macros in the sheet and ask the
user which one they would like to run.

Thanks for any help you can give,
Steve

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default Macro Pop Up

The quick way to see the macros is to press ALT-F8. If you want to control
what they see, you can create a macro that displays a list box of macros, or
a set of option buttons that list the macros. Once a selection is made, it
can execute the macros.

You can assign the above macro to a button or to a menu item on say the
Tools menu for easy access.

If it is likely that you would be modifying the macros, you should consider
putting the macros in an workbook that is an add-in (a property setting of a
workbook) so that you can do replacements easily.

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"Smonczka" wrote in message
ups.com...
I am looking for a way to create a pop up that would ask the user if
they would like to run a macro.

The worksheet has several macros that will alter the sheet in several
ways, either by saving as a new file or altering the formatting.
Users will only want to run one of these macros at any one time. I'm
trying to find a reference that would show me how to create a pop up
window that would list the available macros in the sheet and ask the
user which one they would like to run.

Thanks for any help you can give,
Steve



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Macro Pop Up

Bob Yes I am trying to control what the the users sees and the list
box of available macros would be perfect but I have yet to find any
reference on how to do this.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Macro Pop Up

When is it suppose to pop up?

Merjet


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Macro Pop Up

When the worksheet is first opened. I figured i would use an On Open
comand to invoke the pop up, but I'm still not sure how to create the
pop up in the first place and then how to get the pop up to reference
the embeded macros in that workbook.

Thanks,
Steve




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Macro Pop Up

Add a UserForm. Put a ListBox on it. Put a Label to
suit. In the UserForm's code module put:

Private Sub UserForm_Activate()
myArray = Array("Macro1", "Macro2", "Macro3")
ListBox1.List = myArray
End Sub

Private Sub ListBox1_Change()
If ListBox1.ListIndex -1 Then
Application.Run ListBox1.Value
End If
End Sub

In the ThisWorkbook code module put:

Private Sub Workbook_Open()
UserForm1.Show
End Sub

Hth,
Merjet


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Macro Pop Up

Merjet

Thank you very much, that works perfectly. I mixed that with a few
other things i found in the group and now I have a full blown app.

Thanks so much for your help.

Steve



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Macro Pop Up

Merjet, is it posible to use a ComboBox instead of a ListBox?

thanks,
Steve

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Macro Pop Up

Merjet, is it posible to use a ComboBox instead of a ListBox?

Yes, but the code would need to deal with the user entering something
you don't want. Other than that, the coding is much the same. It would
probably be better to set its Style property to 2.

Merjet


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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Need syntax for RUNning a Word macro with an argument, called from an Excel macro Steve[_84_] Excel Programming 3 July 6th 06 07:42 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 12:20 PM.

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

About Us

"It's about Microsoft Excel"