ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   vb value to cell possible? (https://www.excelbanter.com/excel-programming/316634-vbulletin-value-cell-possible.html)

mgade

vb value to cell possible?
 
How do I put a value from a vb variable into an Excel 2000 cell? I have read
the help file and various forums, but cant get anything but #Value!!

JulieD

vb value to cell possible?
 
Hi

assuming we're talking vba within excel ...
and with your variable called myvariable
then
Range("A1").value = myvariable

where A1 is the cell you want to put it in to.
you could further qualify it using the sheet name, e.g.
Sheets("Sheet1").Range("A1").value = myvariable

Hope this helps
Cheers
JulieD

"mgade" wrote in message
...
How do I put a value from a vb variable into an Excel 2000 cell? I have
read
the help file and various forums, but cant get anything but #Value!!




Jim Thomlinson[_3_]

vb value to cell possible?
 
sheets("Sheet1").range("A1").value = myVariable

or something like that...

"mgade" wrote:

How do I put a value from a vb variable into an Excel 2000 cell? I have read
the help file and various forums, but cant get anything but #Value!!



All times are GMT +1. The time now is 05:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com