View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
polandjc polandjc is offline
external usenet poster
 
Posts: 10
Default Setting a value in an add-in

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