Sheet Update Help

  • Thread starter Thread starter tiptop
  • Start date Start date
T

tiptop

Hello,

I have a vba that allows me to copy stuff from a source to 2nd sheet.
But when I use it, it's copying the formula in the source box, not th
actual displayed text. How can I correct this?

Sub Network()
Dim WS As Worksheet
Dim sourceRng As Range, destRng As Range
Set sourceRng = Range("AL6")
Set WS = Workbooks("Processed Exceptions.xls").Sheets("Processe
Exceptions")
Set destRng = WS.Cells(Rows.Count, "D").End(xlUp)(2)
sourceRng.Copy destRng
End Su
 
Hi tiptop

Untested, but try...

Sub Network()
Dim WS As Worksheet
Dim sourceRng As Range, destRng As Range
Set sourceRng = ActiveSheet.Range("AL6")
Set WS = Workbooks("Processed Exceptions.xls").Sheets("Processed
Exceptions")
Set destRng = WS.Cells(Rows.Count, "D").End(xlUp)(2)
destRng.formula=sourceRng.value2
End Sub

--
XL2002
Regards

William

(e-mail address removed)

| Hello,
|
| I have a vba that allows me to copy stuff from a source to 2nd sheet.
| But when I use it, it's copying the formula in the source box, not the
| actual displayed text. How can I correct this?
|
| Sub Network()
| Dim WS As Worksheet
| Dim sourceRng As Range, destRng As Range
| Set sourceRng = Range("AL6")
| Set WS = Workbooks("Processed Exceptions.xls").Sheets("Processed
| Exceptions")
| Set destRng = WS.Cells(Rows.Count, "D").End(xlUp)(2)
| sourceRng.Copy destRng
| End Sub
|
|
| ---
| Message posted
|
 

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