Converting Paste to PasteSpecial Values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Con someone kindly tell me how to modify the line of code below so that
instead of copying the contents, formatting, validation, etc. of a cell, it
simply copies the cell's value?

Worksheets(Sheet1Name).Cells(Sheet1EmpTypeRowPointer, h). _
Copy Worksheets(Sheet2Name).Cells(Sheet2RowPointer, _
Sheet2EmpTypeColPointer)

Thanks in advance for the help.
 
Add Value

Worksheets(Sheet1Name).Cells(Sheet1EmpTypeRowPointer, h).value _
Copy Worksheets(Sheet2Name).Cells(Sheet2RowPointer, _
Sheet2EmpTypeColPointer).value
 
Hello Bob

Worksheets(Sheet1Name).Cells(Sheet1EmpTypeRowPointer, h).Copy

Worksheets(Sheet2Name).Cells(Sheet2RowPointer, _
Sheet2EmpTypeColPointer).PasteSpecial (xlPasteValues)

HTH
Cordially
Pascal
 
Joel,
Thanks for the help. Unfortunately, after I modified the code per your
suggestion, I now get a "Compile error" message.
Bob
 
Pascal,
That did the trick! Thanks!
Bob


papou said:
Hello Bob

Worksheets(Sheet1Name).Cells(Sheet1EmpTypeRowPointer, h).Copy

Worksheets(Sheet2Name).Cells(Sheet2RowPointer, _
Sheet2EmpTypeColPointer).PasteSpecial (xlPasteValues)

HTH
Cordially
Pascal
 

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

Back
Top