LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default Copy works using A1:L1 Format but Not Cells(..) Format

I have used Range(Cells(a,b),cells(c,d)).Copy in Excel VBA code successfully
before but currently am working on a macro where I use the following
instuction:

wsFrom.Range(Cells(intFRowNum, 1), Cells(intFRowNum, FPMCOL)).Copy

and get an error that reads "Run-tim error '1004'; Application-defined or
object-defined error."

If I substitute the following instruction it works fine (i.e. no error):

wsFrom.Range("A" & intFRowNum & ":" & Chr(64 + FPMCOL) & intFRowNum).Copy

Any idea what's going on?

Will
 
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
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
copy conditional format without using format painter MsConfused Excel Worksheet Functions 2 May 4th 09 07:16 AM
Copy the value of a cell, no format, into several cells. Harvey Eastman Excel Discussion (Misc queries) 3 June 30th 06 03:46 AM
Copy format from row above for selected cells al007 Excel Programming 2 December 9th 05 11:49 AM
copy conditional format to regular format GDC Setting up and Configuration of Excel 3 May 4th 05 09:35 PM


All times are GMT +1. The time now is 11:53 PM.

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

About Us

"It's about Microsoft Excel"