Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
running one macro from within another
I have a rather large workbook and have one worksheet designed as a "data
entry form" and is used a the entry vehicle for another worksheet which is my data source for a mail merge database. I have approximately 55 entry fields in the "data entry form" and they are broken down into several subareas. Example: Corporate information, Sole Proprietorship information, Partnership information, subpoena information, employee information and a couple more. I use a macro that I recorded in "record macro" to select the unprotected cells for data entry into each of the different subcategories. Sole Proprietorship requires different information than the others. The object of this is to have several cells selected and highlighted to allow using the tab key to tab between the selected cells instead of row by row for the entire sheet. When the worksheet opens, I have all the editable cells change to a light blue. I recorded this macro myself via the record feature. I want to have the individual selections, enter sole prop info, enter corporate, enter partnership info etc, select the appropriate cells that I can tab through and color them a yellow. I know how to record the macro to select the various cells and change them to the yellow color, but I also must have it change the cells back to blue BEFORE it changes the cells to yellow. The reason for this is to only have the entry cells as the off color cells for each of the required data entry. I am unable to get the macro recorder to follow me with the selecting of all the cells and changing the colors and then selecting and chaging again. I'm at a loss and hope I've given enrough information for someone. thanks I am using Excell 200 and 2003 Bob Reynolds |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
running one macro from within another
Bob,
I'm not really following your logic in this step: select the various cells and change them to the yellow color, but I also must have it change the cells back to blue BEFORE it changes the cells to yellow. If you end up at yellow, why would they ever need to be blue... or am I missing a step in there? HTH, Bernie MS Excel MVP "Bob Reynolds" wrote in message . .. I have a rather large workbook and have one worksheet designed as a "data entry form" and is used a the entry vehicle for another worksheet which is my data source for a mail merge database. I have approximately 55 entry fields in the "data entry form" and they are broken down into several subareas. Example: Corporate information, Sole Proprietorship information, Partnership information, subpoena information, employee information and a couple more. I use a macro that I recorded in "record macro" to select the unprotected cells for data entry into each of the different subcategories. Sole Proprietorship requires different information than the others. The object of this is to have several cells selected and highlighted to allow using the tab key to tab between the selected cells instead of row by row for the entire sheet. When the worksheet opens, I have all the editable cells change to a light blue. I recorded this macro myself via the record feature. I want to have the individual selections, enter sole prop info, enter corporate, enter partnership info etc, select the appropriate cells that I can tab through and color them a yellow. I know how to record the macro to select the various cells and change them to the yellow color, but I also must have it change the cells back to blue BEFORE it changes the cells to yellow. The reason for this is to only have the entry cells as the off color cells for each of the required data entry. I am unable to get the macro recorder to follow me with the selecting of all the cells and changing the colors and then selecting and chaging again. I'm at a loss and hope I've given enrough information for someone. thanks I am using Excell 200 and 2003 Bob Reynolds |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
running one macro from within another
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! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
running one macro from within another
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! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Disable running of SelectionChange macro when in another macro? | Excel Discussion (Misc queries) | |||
Event Macro running another macro inside | Excel Discussion (Misc queries) | |||
disable user running macro from Tools Macro | Excel Discussion (Misc queries) | |||
Macro running before all others | Excel Programming | |||
Launch Macro in Access via Macro running in Excel??? | Excel Programming |