Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Having a problem using a variable to add a 'name'


Julie, thanks, but that hasn't worked I'm afraid?

I think I'm losing the wood for the trees!

Basically, I just want to define a range (column A in sheet 2) in cod
and then use these values for the validation list in sheet 1.
followed a link to the Contextures site, which was very good, as
initially I had the values in different workbooks. This worked but a
soon as I closed the workbook with the validation values in th
workbook with the validation applied lost all the list items. So, I'
opening the validation book, copying the list items from the other boo
to a new sheet, hiding/protecting this sheet and then, and this is wher
I'm stuck, trying to apply validation to a column on one of the sheets
using the value in the, now hidden, sheet?

Hopefully this makes sense?

Regards,

Adria

--
Kobayash
-----------------------------------------------------------------------
Kobayashi's Profile: http://www.excelforum.com/member.php...info&userid=87
View this thread: http://www.excelforum.com/showthread.php?threadid=27358

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Having a problem using a variable to add a 'name'

In book1 I had a sheet named davvsheet. It was protected and hidden

In Book2 i ran this code

Sub BBTest()
Dim DAbook as Workbook
Set DAbook = Workbooks("Book1.xls")
DAbook.Names.Add Name:="Lookuplist2", RefersToR1C1:= _
"=davvsheet!c1"
End Sub


It created the name LookupList2 in Book1 adn the name refered to column A of
sheet davvsheet.

--
Regards,
Tom Ogilvy



"Kobayashi" wrote in message
...

Julie, thanks, but that hasn't worked I'm afraid?

I think I'm losing the wood for the trees!

Basically, I just want to define a range (column A in sheet 2) in code
and then use these values for the validation list in sheet 1. I
followed a link to the Contextures site, which was very good, as,
initially I had the values in different workbooks. This worked but as
soon as I closed the workbook with the validation values in the
workbook with the validation applied lost all the list items. So, I'm
opening the validation book, copying the list items from the other book
to a new sheet, hiding/protecting this sheet and then, and this is where
I'm stuck, trying to apply validation to a column on one of the sheets,
using the value in the, now hidden, sheet?

Hopefully this makes sense?

Regards,

Adrian


--
Kobayashi
------------------------------------------------------------------------
Kobayashi's Profile:

http://www.excelforum.com/member.php...nfo&userid=871
View this thread: http://www.excelforum.com/showthread...hreadid=273587



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
Having a problem using a variable in Kobayashi[_48_] Excel Programming 1 October 29th 04 01:24 PM
Variable problem TC[_6_] Excel Programming 3 September 16th 04 09:39 PM
Object variable problem ExcelMonkey[_13_] Excel Programming 4 January 23rd 04 08:39 PM
vba variable problem joao Excel Programming 3 December 15th 03 04:31 PM
Problem trying to us a range variable as an array variable TBA[_2_] Excel Programming 4 September 27th 03 02:56 PM


All times are GMT +1. The time now is 08:22 PM.

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

About Us

"It's about Microsoft Excel"