Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Run a sub from a click or toggle in a userform in Excel 2007

Posted on 2011-02-16
3
Medium Priority
?
230 Views
Last Modified: 2012-05-11
I need to start a module running so I would like a front end for the user to start the code.  I would like to create a simple userform and execute;
Sub MainProcessing()
    Select_A_File
    GetMarData
End Sub
0
Comment
Question by:eht9250
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Expert Comment

by:Michael Fowler
ID: 34913162
why not just a button to the sheet and in the on click event call the required sub
0
 
LVL 23

Accepted Solution

by:
Michael Fowler earned 200 total points
ID: 34913189
More complete answer now I am back at my desk

To add a button to you workbook
http://office.microsoft.com/en-us/excel-help/add-a-button-and-assign-a-macro-to-it-in-a-worksheet-HP010236676.aspx

You can also assign a shortcut key to the macro

http://www.lytebyte.com/2008/10/06/how-to-create-custom-keyboard-shortcuts-in-excel-2007/

Michael
0
 

Author Closing Comment

by:eht9250
ID: 34913469
I so much appreciate the quick response!  Makes all the difference.  Thank you.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question