#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 709
Default Command button

I have a command button that when clicked I want it to delete the contents
from Sheet1 D1, Sheet1 B3:B100 and Sheet1 D3:D100. Thanks in advance!!!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Command button

worksheets("Sheet1").range("d1,b3:b100,d3:d100").c learcontents

would be the line that did the real work.

Richard wrote:

I have a command button that when clicked I want it to delete the contents
from Sheet1 D1, Sheet1 B3:B100 and Sheet1 D3:D100. Thanks in advance!!!


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 709
Default Command button

Thanks that works perfect!! Can you also copy Sheet2 Columns, A,B,C to sheet
3 once clicked. Thanks in advance!!

"Dave Peterson" wrote:

worksheets("Sheet1").range("d1,b3:b100,d3:d100").c learcontents

would be the line that did the real work.

Richard wrote:

I have a command button that when clicked I want it to delete the contents
from Sheet1 D1, Sheet1 B3:B100 and Sheet1 D3:D100. Thanks in advance!!!


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Command button

You want to copy 3 whole columns and put them where? This copies those 3
columns and plops them over A:C of sheet3.

worksheets("sheet2").range("a:c").copy _
destination:=worksheets("sheet3").range("A1")

If you wanted the values--not formulas:

worksheets("sheet2").range("a:c").copy
worksheets("sheet3").range("A1").pastespecial paste:=xlpastevalues




Richard wrote:

Thanks that works perfect!! Can you also copy Sheet2 Columns, A,B,C to sheet
3 once clicked. Thanks in advance!!

"Dave Peterson" wrote:

worksheets("Sheet1").range("d1,b3:b100,d3:d100").c learcontents

would be the line that did the real work.

Richard wrote:

I have a command button that when clicked I want it to delete the contents
from Sheet1 D1, Sheet1 B3:B100 and Sheet1 D3:D100. Thanks in advance!!!


--

Dave Peterson


--

Dave Peterson
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
Command button AhmetDY Excel Discussion (Misc queries) 1 October 17th 07 11:36 AM
Command Button Help Kenny Excel Discussion (Misc queries) 2 October 15th 07 03:29 AM
How to add a command button Marilyn Excel Discussion (Misc queries) 3 August 3rd 06 01:44 AM
command button wayno Excel Worksheet Functions 1 July 31st 06 02:02 AM
command button Hellboy Excel Discussion (Misc queries) 0 November 3rd 05 02:51 PM


All times are GMT +1. The time now is 05:48 PM.

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"