PC Review


Reply
Thread Tools Rate Thread

Add-in programming

 
 
=?Utf-8?B?VGltSw==?=
Guest
Posts: n/a
 
      8th Jun 2007
I have a working application I'm trying to convert to an add-in. I have a
worksheet in the add-in workbook providing 160 named ranges of values used to
populate the app's pull down menus. My problem is I can't find a way to
reference the named ranges within a new workbook using the Add-in. I make
reference to the named ranges in two ways. From the forms, I set the
Combobox2.RowSource to ='DataFields'!"$A2,$A23"; and within the code I set
object.RowSource = ThisWorkbook.Names!Priority . This works in the same
workbook, but I can't find a substitute way of setting the reference to look
in the .xla based workbook since that is where the tables are. I've tried
x=workbooks("name.xla").worksheets("DataFields").names!Projects,
x=workbooks("name.xla").worksheets("DataFields").range("A2:A23"), ...
Nothing I've tried works.

Is there a way to do this?
 
Reply With Quote
 
 
 
 
Jim Rech
Guest
Posts: n/a
 
      8th Jun 2007
I think the combobox is looking for a string that has this format when the
source is in another workbook:

[book1.xls]sheet1!a1:a10

So your code should create that I think.

--
Jim
"TimK" <(E-Mail Removed)> wrote in message
news:2C233E6E-768E-460D-9925-(E-Mail Removed)...
>I have a working application I'm trying to convert to an add-in. I have a
> worksheet in the add-in workbook providing 160 named ranges of values used
> to
> populate the app's pull down menus. My problem is I can't find a way to
> reference the named ranges within a new workbook using the Add-in. I make
> reference to the named ranges in two ways. From the forms, I set the
> Combobox2.RowSource to ='DataFields'!"$A2,$A23"; and within the code I set
> object.RowSource = ThisWorkbook.Names!Priority . This works in the same
> workbook, but I can't find a substitute way of setting the reference to
> look
> in the .xla based workbook since that is where the tables are. I've tried
> x=workbooks("name.xla").worksheets("DataFields").names!Projects,
> x=workbooks("name.xla").worksheets("DataFields").range("A2:A23"), ...
> Nothing I've tried works.
>
> Is there a way to do this?



 
Reply With Quote
 
=?Utf-8?B?VGltSw==?=
Guest
Posts: n/a
 
      8th Jun 2007
That worked! That solves my form problem. I should be able to use this to
work out coding solution. I'd like to stick to the names if I can because
that allows the code to work without change should I add to the data ranges.
Thanks very much.

"Jim Rech" wrote:

> I think the combobox is looking for a string that has this format when the
> source is in another workbook:
>
> [book1.xls]sheet1!a1:a10
>
> So your code should create that I think.
>
> --
> Jim
> "TimK" <(E-Mail Removed)> wrote in message
> news:2C233E6E-768E-460D-9925-(E-Mail Removed)...
> >I have a working application I'm trying to convert to an add-in. I have a
> > worksheet in the add-in workbook providing 160 named ranges of values used
> > to
> > populate the app's pull down menus. My problem is I can't find a way to
> > reference the named ranges within a new workbook using the Add-in. I make
> > reference to the named ranges in two ways. From the forms, I set the
> > Combobox2.RowSource to ='DataFields'!"$A2,$A23"; and within the code I set
> > object.RowSource = ThisWorkbook.Names!Priority . This works in the same
> > workbook, but I can't find a substitute way of setting the reference to
> > look
> > in the .xla based workbook since that is where the tables are. I've tried
> > x=workbooks("name.xla").worksheets("DataFields").names!Projects,
> > x=workbooks("name.xla").worksheets("DataFields").range("A2:A23"), ...
> > Nothing I've tried works.
> >
> > Is there a way to do this?

>
>
>

 
Reply With Quote
 
=?Utf-8?B?VGltSw==?=
Guest
Posts: n/a
 
      9th Jun 2007
I've tried to develop code within my macros to access the tables by name but
haven't been successful. I need to be able to change the RowSource of my
ComboBox fields because many fields on my forms change picklist context with
the content of other fields. I've tried several variations on the solution
for the in-form reference below but keep getting either "need object" or
compile errors on what I come up with. Does anyone have a way to set
rowsource to a named range of values in a sheet of an Add-in?

"TimK" wrote:

> That worked! That solves my form problem. I should be able to use this to
> work out coding solution. I'd like to stick to the names if I can because
> that allows the code to work without change should I add to the data ranges.
> Thanks very much.
>
> "Jim Rech" wrote:
>
> > I think the combobox is looking for a string that has this format when the
> > source is in another workbook:
> >
> > [book1.xls]sheet1!a1:a10
> >
> > So your code should create that I think.
> >
> > --
> > Jim
> > "TimK" <(E-Mail Removed)> wrote in message
> > news:2C233E6E-768E-460D-9925-(E-Mail Removed)...
> > >I have a working application I'm trying to convert to an add-in. I have a
> > > worksheet in the add-in workbook providing 160 named ranges of values used
> > > to
> > > populate the app's pull down menus. My problem is I can't find a way to
> > > reference the named ranges within a new workbook using the Add-in. I make
> > > reference to the named ranges in two ways. From the forms, I set the
> > > Combobox2.RowSource to ='DataFields'!"$A2,$A23"; and within the code I set
> > > object.RowSource = ThisWorkbook.Names!Priority . This works in the same
> > > workbook, but I can't find a substitute way of setting the reference to
> > > look
> > > in the .xla based workbook since that is where the tables are. I've tried
> > > x=workbooks("name.xla").worksheets("DataFields").names!Projects,
> > > x=workbooks("name.xla").worksheets("DataFields").range("A2:A23"), ...
> > > Nothing I've tried works.
> > >
> > > Is there a way to do this?

> >
> >
> >

 
Reply With Quote
 
gimme_this_gimme_that@yahoo.com
Guest
Posts: n/a
 
      9th Jun 2007
You've certainly already thought of this ...

You get two things going:

1. The XLA (Number crunching Macros and Worksheets you don't want to
release), AND
2. The Template (With formatting stuff, navigation stuff, and charting
stuff)

You end up adding a hidden sheet in the template for navigation and
when your macros run you store data in the navigation sheet so the
Template can be saved as a normal Workbook.

On large projects you can allow business analysts to maintain the
template.

In other words, you have to handle it with coding. No easy work
around.

 
Reply With Quote
 
=?Utf-8?B?VGltSw==?=
Guest
Posts: n/a
 
      9th Jun 2007
I agree, but How? Everything I've tried doesn't work...

"(E-Mail Removed)" wrote:

> You've certainly already thought of this ...
>
> You get two things going:
>
> 1. The XLA (Number crunching Macros and Worksheets you don't want to
> release), AND
> 2. The Template (With formatting stuff, navigation stuff, and charting
> stuff)
>
> You end up adding a hidden sheet in the template for navigation and
> when your macros run you store data in the navigation sheet so the
> Template can be saved as a normal Workbook.
>
> On large projects you can allow business analysts to maintain the
> template.
>
> In other words, you have to handle it with coding. No easy work
> around.
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Choice of programming tool for Outlook programming tanutatu@hotmail.com Microsoft Outlook VBA Programming 4 13th Jul 2006 10:48 AM
Which programming language for programming for fun? Chris Freeware 18 3rd Apr 2006 01:06 PM
Will OOP programming go off and be replaced by AOP programming marathikaka@yahoo.co.in Microsoft VB .NET 3 23rd Aug 2005 03:49 PM
rpilot programming language - based on the pilot programming language *ProteanThread* Freeware 0 1st Feb 2005 10:10 PM
IIS programming Oleg Ogurok Microsoft Dot NET Framework 2 30th May 2004 02:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:04 AM.