Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Setting a value in an add-in

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Setting a value in an add-in

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Setting a value in an add-in

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Setting a value in an add-in

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   Report Post  
Posted to microsoft.public.excel.programming
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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Setting a value in an add-in

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
setting default filter setting tpeter Charts and Charting in Excel 0 December 4th 09 02:50 PM
Setting a datarange Joyce Excel Discussion (Misc queries) 1 May 24th 05 02:22 AM
Setting default pivot table field setting to "sum" Mr. Moose Excel Discussion (Misc queries) 2 December 21st 04 04:43 PM
VBA Setting .Value to a date does not respect local system setting Frank_Hamersley Excel Programming 13 July 18th 04 02:51 PM
Sending email via macro- setting the importance setting. Julian Milano[_2_] Excel Programming 1 January 20th 04 10:15 PM


All times are GMT +1. The time now is 09:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"