Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Paste Merged Cell Format
My Code:
It Bombs after running Line 6; Public Sub CellFormat() Application.ScreenUpdating = False r = ActiveCell.Row Worksheets("CellFormat") _ .Range("C1:N1").EntireRow.Copy Worksheets("Sheet1").Activate Rows("r:r").Select <<< Bombs Here with R/T error 1004.. Why? ActiveSheet.Paste Application.CutCopyMode = False Application.ScreenUpdating = True End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Paste Merged Cell Format
Hi
what row should R:R be?? This has either be a column or change the reference to a row reference. Note: In most cases no need for select(activate statements at all "Jim May" wrote: My Code: It Bombs after running Line 6; Public Sub CellFormat() Application.ScreenUpdating = False r = ActiveCell.Row Worksheets("CellFormat") _ .Range("C1:N1").EntireRow.Copy Worksheets("Sheet1").Activate Rows("r:r").Select <<< Bombs Here with R/T error 1004.. Why? ActiveSheet.Paste Application.CutCopyMode = False Application.ScreenUpdating = True End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Paste Merged Cell Format
Let's say I'm in Cell C4 on Sheet1 when I run the code. r = Activecell.row ' r = 4 where later I'm trying to select rows("4:4").select ' using rows("r:r") Jim May *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Paste Merged Cell Format
r = 4
Rows(r).Select -- Regards, Tom Ogilvy "Jim May" wrote in message ... Let's say I'm in Cell C4 on Sheet1 when I run the code. r = Activecell.row ' r = 4 where later I'm trying to select rows("4:4").select ' using rows("r:r") Jim May *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Paste Merged Cell Format
Hope this helps.
<<< you were trying to put a variable in a sring when u put it in quotes Application.ScreenUpdating = False r = ActiveCell.Row Worksheets("CellFormat") _ .Range("C1:N1").EntireRow.Copy Worksheets("Sheet1").Activate Rows(r).Select ActiveSheet.Paste Application.CutCopyMode = False Application.ScreenUpdating = True -----Original Message----- My Code: It Bombs after running Line 6; Public Sub CellFormat() Application.ScreenUpdating = False r = ActiveCell.Row Worksheets("CellFormat") _ .Range("C1:N1").EntireRow.Copy Worksheets("Sheet1").Activate Rows("r:r").Select <<< Bombs Here with R/T error 1004.. Why? ActiveSheet.Paste Application.CutCopyMode = False Application.ScreenUpdating = True End Sub . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Paste Merged Cell Format
Thanks Tom;
Incidentally, last week I was on Google searching for something and easily enough came across a thread you were involved with in 2003 - where out of the blue you made the comment "i'm your huckleberry" <<< which immediately brought a smile to my face being a fan "of a sort" of the legend - Doc Holliday. I've seen 4 or 5 versions of "Gunfight at the OK Corral" - and one of the best lines in Tombstone is Val Kilmer saying it to Johnny Ringo; Only wish in Wyatt Earp they had written it in the script for Dennis Quaid to have said it. You probably know "that there is only one thing better than a western,," and that is "another western!!" - Of course to me Lonesome Dove is the "highest calling" of all westerns... Thank you for your contribution to the various Excel NG's - you are much appreciated. Jim May Roanoke http://www.dochollidaysociety.org/ "Tom Ogilvy" wrote in message ... r = 4 Rows(r).Select -- Regards, Tom Ogilvy "Jim May" wrote in message ... Let's say I'm in Cell C4 on Sheet1 when I run the code. r = Activecell.row ' r = 4 where later I'm trying to select rows("4:4").select ' using rows("r:r") Jim May *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Paste Merged Cell Format
That was Val Kilmer's line for sure.
True, nothing like a good western. Too bad they are so few and far in between these days <g -- Regards, Tom Ogilvy "Jim May" wrote in message news:vzIkd.2255$_q1.1559@lakeread08... Thanks Tom; Incidentally, last week I was on Google searching for something and easily enough came across a thread you were involved with in 2003 - where out of the blue you made the comment "i'm your huckleberry" <<< which immediately brought a smile to my face being a fan "of a sort" of the legend - Doc Holliday. I've seen 4 or 5 versions of "Gunfight at the OK Corral" - and one of the best lines in Tombstone is Val Kilmer saying it to Johnny Ringo; Only wish in Wyatt Earp they had written it in the script for Dennis Quaid to have said it. You probably know "that there is only one thing better than a western,," and that is "another western!!" - Of course to me Lonesome Dove is the "highest calling" of all westerns... Thank you for your contribution to the various Excel NG's - you are much appreciated. Jim May Roanoke http://www.dochollidaysociety.org/ "Tom Ogilvy" wrote in message ... r = 4 Rows(r).Select -- Regards, Tom Ogilvy "Jim May" wrote in message ... Let's say I'm in Cell C4 on Sheet1 when I run the code. r = Activecell.row ' r = 4 where later I'm trying to select rows("4:4").select ' using rows("r:r") Jim May *** 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 | |||
Lock Cell Format - Allow copy and paste of data without format change | Excel Worksheet Functions | |||
Copy paste non merged to merged cells | Excel Worksheet Functions | |||
Copy/Paste into merged cells | Excel Discussion (Misc queries) | |||
Autofit Merged cell Code is changing the format of my merged cells | Excel Discussion (Misc queries) | |||
How do I copy data in single cell format to a merged cell format | Excel Discussion (Misc queries) |