Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XL97 VBA Paste a variable 1

Status
Not open for further replies.

vaneagle

Technical User
Apr 23, 2003
71
AU
Hi,

Having a mental block!! Code is as below;

Code:
Dim openStockCost As String
      openStockCost = Range(nCOL & nROW + 1) 
      WB.Activate
      Sheets("Cost").Select
      Range("e40").Select

how do I paste the value of
Code:
openStockCost
into cell e40 ??

Yep its one of those days!! :-(
 
Hi Vaneagle,

Why paste? Just set the range's value as openStockCost's value.

Code:
Dim openStockCost As String
      openStockCost = Range(nCOL & nROW + 1) 
      WB.Sheets("Cost").Range("e40") = openStockCost

I am assuming that you have Declared and Set WB?

I hope this helps!



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Excellent.

Thanks for your answer and thanks for your quick reply!!

Have a star!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top