Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I just recorded the following macro:
Sub Macro1() ' ' Macro1 Macro ' Macro recorded 11/3/2006 by df78700 ' ' Cells.Select Range("A8").Activate Selection.Copy Workbooks.Add Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub I'm trying to select the entire worksheet and then create a new workbook and paste all the cell values (not formulas) into that new workbook. This seems to work fine, however, Range("A8") confuses me: obviously the range of an entire XL worksheet is not one cell! What am I missing here? -- Brevity is the soul of wit. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
try
Cells.Copy Workbooks.Add Selection.PasteSpecial Paste:=xlPasteValues End Sub -- Don Guillett SalesAid Software "Dave F" wrote in message ... I just recorded the following macro: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 11/3/2006 by df78700 ' ' Cells.Select Range("A8").Activate Selection.Copy Workbooks.Add Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub I'm trying to select the entire worksheet and then create a new workbook and paste all the cell values (not formulas) into that new workbook. This seems to work fine, however, Range("A8") confuses me: obviously the range of an entire XL worksheet is not one cell! What am I missing here? -- Brevity is the soul of wit. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dave,
This is about activating a cell and selecting cells. Lots of cells can be selected, but only one, the white one, is active. You've activated A8, but a selection has never been made So without a selection, the Copy method puts all the cells on the clipboard. If you add something like Range("A7").Select first, then Range("A8").Activate will also select A8, and your macro will copy/paste only A8. Better yet, change Range("A8).Activate to Range("A8").Select. -- Earl Kiosterud www.smokeylake.com ----------------------------------------------------------------------- "Dave F" wrote in message ... I just recorded the following macro: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 11/3/2006 by df78700 ' ' Cells.Select Range("A8").Activate Selection.Copy Workbooks.Add Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub I'm trying to select the entire worksheet and then create a new workbook and paste all the cell values (not formulas) into that new workbook. This seems to work fine, however, Range("A8") confuses me: obviously the range of an entire XL worksheet is not one cell! What am I missing here? -- Brevity is the soul of wit. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi.
ActiveSheet.Copy Will copy the sheet to a new Workbook. If you select a small area, you will see that 1 cell is always "active," even though you have selected more than 1 cell. -- HTH :) Dana DeLouis Windows XP & Office 2003 "Dave F" wrote in message ... I just recorded the following macro: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 11/3/2006 by df78700 ' ' Cells.Select Range("A8").Activate Selection.Copy Workbooks.Add Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub I'm trying to select the entire worksheet and then create a new workbook and paste all the cell values (not formulas) into that new workbook. This seems to work fine, however, Range("A8") confuses me: obviously the range of an entire XL worksheet is not one cell! What am I missing here? -- Brevity is the soul of wit. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
question on macro | Excel Discussion (Misc queries) | |||
Macro Button Question | Excel Discussion (Misc queries) | |||
Simple Hyperlink Macro | New Users to Excel | |||
New Excel user needs help with simple Macro... | New Users to Excel | |||
Can't get simple macro to run | Excel Worksheet Functions |