ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   write to/read from add-ins (https://www.excelbanter.com/excel-programming/279249-write-read-add-ins.html)

abartkowski

write to/read from add-ins
 
I want to store some data in the XLA sheets and then use it in my
program. Is it possible to write/read the data using VBA? If so, how?



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


Bernie Deitrick[_2_]

write to/read from add-ins
 
In the XLA, use code like:
Dim myValue As Integer

To read a value:
myValue = ThisWorkbook.Worksheets("Sheet1").Range("A1").Valu e

To write a value:
myValue = 3
ThisWorkbook.Worksheets("Sheet1").Range("A1").Valu e = myValue

HTH,
Bernie


"abartkowski" wrote in
message ...
I want to store some data in the XLA sheets and then use it in my
program. Is it possible to write/read the data using VBA? If so,

how?



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from

http://www.ExcelForum.com/




Tom Ogilvy

write to/read from add-ins
 
as long as the xla is loaded:

workbooks("MyXLa.xls").Worksheets("Sheet1").Range( "A1").Value = 21

--
Regards,
Tom Ogilvy


"abartkowski" wrote in message
...
I want to store some data in the XLA sheets and then use it in my
program. Is it possible to write/read the data using VBA? If so, how?



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/




Tom Ogilvy

write to/read from add-ins
 
for example:

? workbooks("ATPVBAEN.xlA").Sheets(1).Name
REG
?
workbooks("ATPVBAEN.xla").Sheets("Reg").Cells.spec ialcells(xlConstants).Addr
ess
$B$1:$B$2,$A$25:$B$25,$A$27:$A$33,$A$44,$A$46,$A$5 0,$A$60,$B$64,$A$65:$A$195
,$A$202
? workbooks("ATPVBAEN.xla").Sheets("Reg").Range("A25 ").Value
AnalysisPath


"Tom Ogilvy" wrote in message
...
as long as the xla is loaded:

workbooks("MyXLa.xls").Worksheets("Sheet1").Range( "A1").Value = 21

--
Regards,
Tom Ogilvy


"abartkowski" wrote in message
...
I want to store some data in the XLA sheets and then use it in my
program. Is it possible to write/read the data using VBA? If so, how?



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from

http://www.ExcelForum.com/







All times are GMT +1. The time now is 01:31 PM.

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