View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Reynolds[_2_] Bob Reynolds[_2_] is offline
external usenet poster
 
Posts: 8
Default running one macro from within another

The one simple little entry did exactly what I wanted. Thanks so much. I
couldn't find that anywhere but now that you've help I'll probably come
across it everywhere.
Bob
"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Bob,

Do you know the macro's name and where it resides? If it is the
workbook open event (in the ThisWorkbook object's codemodule), then
you can move the code to another macro and call it from both the open
event as well as from your macro. If it is another macro already,
then you can simply call it, which an be as easy as just typing in the
macro name on its own line:

Sub Macro1()
Macro2
MsgBox "Goodbye"
End Sub

Sub Macro2()
MsgBox "Hi"
End Sub

Running Macro1 will first run Macro2.

HTH,
Bernie
MS Excel MVP

"BOB REYNOLDS" wrote in message
...
I know it sounds strange. The goal (my bosses) is to have all cells

lt
blue on open of workbook. He wants all cells that I'm going to

select
for entry, wherever they are highlighted in yellow, to enable the

user
to see what and where entry will be made.

Next set of data to be entered will have a lot of blue background

with
yellow from the previous portion selected. He wants the color blue

back
to all cells except the now selected entry cells.

His mindset says this will show immediately where the entry cells

are
and make it easier for all.

This worksheet isn't printed and the changing of cell colors are
strictly for cosmetics and "ease of use" for the Field Investigator

that
uses this workbook.

My thought was to run the existing macro that makes all cells blue

upon
opening the workbook and running it in front of the new macro for

the
selection of the highlighted new cells. The existing macro works

upon
opening and I have no idea and can't find anything that shows me how

to
activate that macro in front of any of the other ones.

Thanks for your help
Bob



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!