Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there some way to set a cell value or a public variable in an add-in from
another worksheet that is using the add-in? If so, how? TIA! Jim |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim myVal as variant
myval = workbooks("otherworkbook.xls").worksheets("sheet1" ).range("a1").value If I understood. polandjc wrote: Is there some way to set a cell value or a public variable in an add-in from another worksheet that is using the add-in? If so, how? TIA! Jim -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually I wanted to do the reverse
(workbooks("otherworkbook.xls").worksheets("sheet1 ").range("a1") = myval). When I tried setting a cell value it ignored the statement without raising an error. Wondered if perhaps instead I could access a public property. Jim "Dave Peterson" wrote: Dim myVal as variant myval = workbooks("otherworkbook.xls").worksheets("sheet1" ).range("a1").value If I understood. polandjc wrote: Is there some way to set a cell value or a public variable in an add-in from another worksheet that is using the add-in? If so, how? TIA! Jim -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do you have "on error resume next" turned on when that statement runs?
I've never seen VBA ignore a statement like this. polandjc wrote: Actually I wanted to do the reverse (workbooks("otherworkbook.xls").worksheets("sheet1 ").range("a1") = myval). When I tried setting a cell value it ignored the statement without raising an error. Wondered if perhaps instead I could access a public property. Jim "Dave Peterson" wrote: Dim myVal as variant myval = workbooks("otherworkbook.xls").worksheets("sheet1" ).range("a1").value If I understood. polandjc wrote: Is there some way to set a cell value or a public variable in an add-in from another worksheet that is using the add-in? If so, how? TIA! Jim -- Dave Peterson -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nope... no error trapping at all. Acts as if it set a value in the
spreadsheet but there's nothing there. I'd rather use a public variable though as it seems cleaner. Jim "Dave Peterson" wrote: Do you have "on error resume next" turned on when that statement runs? I've never seen VBA ignore a statement like this. polandjc wrote: Actually I wanted to do the reverse (workbooks("otherworkbook.xls").worksheets("sheet1 ").range("a1") = myval). When I tried setting a cell value it ignored the statement without raising an error. Wondered if perhaps instead I could access a public property. Jim "Dave Peterson" wrote: Dim myVal as variant myval = workbooks("otherworkbook.xls").worksheets("sheet1" ).range("a1").value If I understood. polandjc wrote: Is there some way to set a cell value or a public variable in an add-in from another worksheet that is using the add-in? If so, how? TIA! Jim -- Dave Peterson -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I guess I'm confused.
You have a workbook and an addin. The code you're running is in which? The value is in which? The public variable is in which? polandjc wrote: Nope... no error trapping at all. Acts as if it set a value in the spreadsheet but there's nothing there. I'd rather use a public variable though as it seems cleaner. Jim "Dave Peterson" wrote: Do you have "on error resume next" turned on when that statement runs? I've never seen VBA ignore a statement like this. polandjc wrote: Actually I wanted to do the reverse (workbooks("otherworkbook.xls").worksheets("sheet1 ").range("a1") = myval). When I tried setting a cell value it ignored the statement without raising an error. Wondered if perhaps instead I could access a public property. Jim "Dave Peterson" wrote: Dim myVal as variant myval = workbooks("otherworkbook.xls").worksheets("sheet1" ).range("a1").value If I understood. polandjc wrote: Is there some way to set a cell value or a public variable in an add-in from another worksheet that is using the add-in? If so, how? TIA! Jim -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
setting default filter setting | Charts and Charting in Excel | |||
Setting a datarange | Excel Discussion (Misc queries) | |||
Setting default pivot table field setting to "sum" | Excel Discussion (Misc queries) | |||
VBA Setting .Value to a date does not respect local system setting | Excel Programming | |||
Sending email via macro- setting the importance setting. | Excel Programming |