Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that adds then deletes
I have a workbook that has an entry spreadsheet and an actual data table sheet. The entry spreadsheet is used to enter new data into the table without having to have users access the table directly. I am doing this with a macro that adds the new data to the next open row. Each row has about 20 different data entry points
Sub AddData( ' Macro3 Macr ' Macro recorded 12/1/2003 by Brian McGuir Sheets("input").Range("A20:AB20").Copy Destination:= Sheets("database").Cells(Rows.Count, 1).End(xlUp) .Offset(1, 0 End Su The macro is exceuted by ctrl+a. The macro itself works fine, I just need some modifications 1) is there a way to add just a button on the toolbar, or possibly to a cell beneath the entry row in order to get the data adde 2)After the data has been added to the table, I would like the macro to erase the data entered in the input shee 3)I would like the color of the destination text and cell to be different once it has been added Any help would be greatly appreciated. Thanks in advance Brian |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that adds then deletes
Brian, 1) show the "control toolbox" toolbar and there you find a comman button to "draw" where you want. then go to the properties and give that button an nice name an description (caption) then go to the code of the button and call your macro from there with call AddData and exit the design mode (button on the toolbar) 2) and 3) sorry I'm in a hurry.. ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that adds then deletes
Thanks
I figured out point 2, but I could still use some assistance on changing the colors of the added text and cells. Any help on this would be greatly appreciated. Thank you Bria 3)I would like the color of the destination text and cell to be different once it has been added ----- goepf wrote: ---- Brian 1) show the "control toolbox" toolbar and there you find a comman button to "draw" where you want then go to the properties and give that button an nice name an description (caption then go to the code of the button and call your macro from there with call AddDat and exit the design mode (button on the toolbar 2) and 3) sorry I'm in a hurry.. ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statement |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that adds then deletes
3) always the same colors? then I would do it with conditional formatting. Thats an easy way. You check if the cell is empty and if not you format how ever you want (background and font). goepf wrote: *Brian, 1) show the "control toolbox" toolbar and there you find a command button to "draw" where you want. then go to the properties and give that button an nice name and description (caption) then go to the code of the button and call your macro from there with: call AddData and exit the design mode (button on the toolbar) 2) and 3) sorry I'm in a hurry... * ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro deletes wrong columns | Excel Discussion (Misc queries) | |||
Macro deletes row in range, macro then skips the row moved up | Excel Discussion (Misc queries) | |||
Excel Charting Macro That deletes Sheet | Excel Discussion (Misc queries) | |||
shared file adds or deletes rows | Excel Discussion (Misc queries) | |||
Macro that deletes every third row....+ | Excel Discussion (Misc queries) |