#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default combo box - VBA form

HI

I have created a form via VBA, I have included a combo box which I want to
point at a specific list of entries.

I can do this on a normal worksheet using data validation, how do I do it in
VBA design mode
--
thanks
Roy
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default combo box - VBA form

Hi,

One way

Private Sub UserForm_Initialize()
For x = 1 To 6
ComboBox1.AddItem Worksheets("Sheet1").Cells(x, 1).Value
Next
End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Roy Gudgeon" wrote:

HI

I have created a form via VBA, I have included a combo box which I want to
point at a specific list of entries.

I can do this on a normal worksheet using data validation, how do I do it in
VBA design mode
--
thanks
Roy

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default combo box - VBA form

Maybe neater

Private Sub UserForm_Initialize()
ComboBox1.RowSource = "Sheet1!" & "$A$1:$A$6"
End Sub

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Roy Gudgeon" wrote:

HI

I have created a form via VBA, I have included a combo box which I want to
point at a specific list of entries.

I can do this on a normal worksheet using data validation, how do I do it in
VBA design mode
--
thanks
Roy

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default combo box - VBA form

Thanks Mike

Easy when you know how, appreciate prompt reply and solution.
Sure I'll be back, am still learning and I'm not a quick learner !
--
thanks
Roy


"Mike H" wrote:

Maybe neater

Private Sub UserForm_Initialize()
ComboBox1.RowSource = "Sheet1!" & "$A$1:$A$6"
End Sub

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Roy Gudgeon" wrote:

HI

I have created a form via VBA, I have included a combo box which I want to
point at a specific list of entries.

I can do this on a normal worksheet using data validation, how do I do it in
VBA design mode
--
thanks
Roy

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
linking a form combo box... results from the combo box to another Trey Excel Discussion (Misc queries) 1 July 15th 07 01:58 AM
combo boxes on a form Russell-stanely Excel Discussion (Misc queries) 3 July 5th 05 09:13 PM
VBA Form Combo Box question. WTG Excel Discussion (Misc queries) 3 February 26th 05 04:28 PM
Using a combo box in an Excel form xlcharlie Excel Discussion (Misc queries) 5 February 16th 05 04:47 PM
Form Combo Box Jeff Excel Discussion (Misc queries) 1 December 15th 04 04:10 PM


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