Copy works using A1:L1 Format but Not Cells(..) Format

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top