Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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 deletes wrong columns Wanna Learn Excel Discussion (Misc queries) 4 October 6th 09 04:34 PM
Macro deletes row in range, macro then skips the row moved up steven.holloway Excel Discussion (Misc queries) 8 June 11th 08 11:40 AM
Excel Charting Macro That deletes Sheet Dave_Tho1968 Excel Discussion (Misc queries) 3 October 15th 07 09:02 PM
shared file adds or deletes rows woodman Excel Discussion (Misc queries) 0 May 31st 07 04:46 PM
Macro that deletes every third row....+ ajjag Excel Discussion (Misc queries) 4 June 27th 06 06:03 PM


All times are GMT +1. The time now is 03:34 AM.

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

About Us

"It's about Microsoft Excel"