Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Put a predefined name range in to a ComboBox in a Form (VBA)

Here is the Create Name code:

ActiveWorkbook.Names.Add Name:=Sheets("Settings").Range("B1").Value,
RefersTo:=Range(Sheets("Settings").Range("B2"),
Sheets("Inställningar").Range("B65536").End(xlUp))

Where the cell B1 contains the name "type".

This means that i got a named range called type containing the cells B2
to the end of the column that have text. this works perfectly... now
the question.


I want to replace this: (this is the question)

UF.combTYP.List = Range(Sheets("Inställningar").Range("B2"),
Sheets("Inställningar").Range("B65536").End(xlUp)) .Value
with this
UF.combTYP.List = Range("type")
or this
UF.combTYP.List = Range("type").value
or this
ActiveWorkbook.Names("Typ").Value
or this
ActiveWorkbook.Names("Typ").RefersToRange

But nothing works...
Please help

UF = User form
combTYP = the combobox

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Put a predefined name range in to a ComboBox in a Form (VBA)

or this
ActiveWorkbook.Names("Typ").Va*lue
or this
ActiveWorkbook.Names("Typ").Re*fersToRange

should be

or this
ActiveWorkbook.Names("type").Va*lue
or this
ActiveWorkbook.Names("type").Re*fersToRange

Misspelling in this letter

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
form control combobox Gail Excel Discussion (Misc queries) 7 October 2nd 09 07:27 PM
Form Help - ComboBox - VBA jlclyde Excel Discussion (Misc queries) 5 January 13th 09 08:20 PM
link form combobox hngo Excel Worksheet Functions 0 July 28th 06 03:38 PM
VBA Form ComboBox question WTG Excel Worksheet Functions 3 February 26th 05 04:27 PM
VBA Form ComboBox question WTG Excel Programming 3 February 26th 05 03:19 PM


All times are GMT +1. The time now is 07:47 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"