Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default MatchEntry for combobox added during runtime

Hi,

I hope one of you Gurus can help me on this one.

How can i set MatchEntry for this combobox ?

KontrolNavn = "Kontrol" & X + 1
Set mycmd = UserForm2.Controls.Add("Forms.combobox.1", KontrolNavn,
True)
With mycmd
.Left = 170
.Top = 5 + X * 20
.Width = 100
.RowSource = Cells(Target.Row + X + 1, 4).Value
.Value = Cells(Target.Row + X + 1, Target.Column).Value
End With


Regards

Claus


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default MatchEntry for combobox added during runtime

in teh code below, I removed your lines to make the additions a bit
clearer...I hope!

Dim mycmd As ComboBox

Set mycmd = _
UserForm2.Controls.Add("Forms.combobox.1", KontrolNavn, True)
With mycmd

.MatchEntry = fmMatchEntryComplete
End With


"Claus" wrote:

Hi,

I hope one of you Gurus can help me on this one.

How can i set MatchEntry for this combobox ?

KontrolNavn = "Kontrol" & X + 1
Set mycmd = UserForm2.Controls.Add("Forms.combobox.1", KontrolNavn,
True)
With mycmd
.Left = 170
.Top = 5 + X * 20
.Width = 100
.RowSource = Cells(Target.Row + X + 1, 4).Value
.Value = Cells(Target.Row + X + 1, Target.Column).Value
End With


Regards

Claus



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default MatchEntry for combobox added during runtime

Hi Patrick

Sorry i was'ent expressing myself clearly, but i've triede this and it
did'nt work.

Claus
"Patrick Molloy" skrev i en
meddelelse ...
in teh code below, I removed your lines to make the additions a bit
clearer...I hope!

Dim mycmd As ComboBox

Set mycmd = _
UserForm2.Controls.Add("Forms.combobox.1", KontrolNavn, True)
With mycmd

.MatchEntry = fmMatchEntryComplete
End With


"Claus" wrote:

Hi,

I hope one of you Gurus can help me on this one.

How can i set MatchEntry for this combobox ?

KontrolNavn = "Kontrol" & X + 1
Set mycmd = UserForm2.Controls.Add("Forms.combobox.1",
KontrolNavn,
True)
With mycmd
.Left = 170
.Top = 5 + X * 20
.Width = 100
.RowSource = Cells(Target.Row + X + 1, 4).Value
.Value = Cells(Target.Row + X + 1, Target.Column).Value
End With


Regards

Claus





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default MatchEntry for combobox added during runtime

Sorry Patrick

It works.

I'm using the wrong property, i need to make sure that the user only can
select a listitem and type something else.

Claus
"Patrick Molloy" skrev i en
meddelelse ...
in teh code below, I removed your lines to make the additions a bit
clearer...I hope!

Dim mycmd As ComboBox

Set mycmd = _
UserForm2.Controls.Add("Forms.combobox.1", KontrolNavn, True)
With mycmd

.MatchEntry = fmMatchEntryComplete
End With


"Claus" wrote:

Hi,

I hope one of you Gurus can help me on this one.

How can i set MatchEntry for this combobox ?

KontrolNavn = "Kontrol" & X + 1
Set mycmd = UserForm2.Controls.Add("Forms.combobox.1",
KontrolNavn,
True)
With mycmd
.Left = 170
.Top = 5 + X * 20
.Width = 100
.RowSource = Cells(Target.Row + X + 1, 4).Value
.Value = Cells(Target.Row + X + 1, Target.Column).Value
End With


Regards

Claus





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default MatchEntry for combobox added during runtime

Hi again

Now i'm using

With mycmd
.MatchEntry = fmMatchEntryComplete
.MatchRequired = True
...
...
End With

but the MatchRequired dos'ent work with my combos added during runtime.
I've triede with a combobox added manually and it works.

Claus


"Patrick Molloy" skrev i en
meddelelse ...
in teh code below, I removed your lines to make the additions a bit
clearer...I hope!

Dim mycmd As ComboBox

Set mycmd = _
UserForm2.Controls.Add("Forms.combobox.1", KontrolNavn, True)
With mycmd

.MatchEntry = fmMatchEntryComplete
End With


"Claus" wrote:

Hi,

I hope one of you Gurus can help me on this one.

How can i set MatchEntry for this combobox ?

KontrolNavn = "Kontrol" & X + 1
Set mycmd = UserForm2.Controls.Add("Forms.combobox.1",
KontrolNavn,
True)
With mycmd
.Left = 170
.Top = 5 + X * 20
.Width = 100
.RowSource = Cells(Target.Row + X + 1, 4).Value
.Value = Cells(Target.Row + X + 1, Target.Column).Value
End With


Regards

Claus







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default MatchEntry for combobox added during runtime

..Style = 2

HTH. Best wishes Harald

"Claus" skrev i melding
...
Sorry Patrick

It works.

I'm using the wrong property, i need to make sure that the user only can
select a listitem and type something else.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default MatchEntry for combobox added during runtime

Thank you Harald

Regards,
Claus


"Harald Staff" skrev i en meddelelse
...
.Style = 2

HTH. Best wishes Harald

"Claus" skrev i melding
...
Sorry Patrick

It works.

I'm using the wrong property, i need to make sure that the user only can
select a listitem and type something else.





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
Textbox added to Form at runtime too small, can't control size andchange event won't trigger RCGUA Excel Worksheet Functions 2 December 10th 08 09:34 PM
Textbox added to Form at runtime too small, can't control size andchange event won't trigger RCGUA Excel Worksheet Functions 0 December 10th 08 07:48 PM
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
add event to controls added in runtime Brotha lee Excel Programming 1 May 21st 05 10:32 AM
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox Minitman[_4_] Excel Programming 3 October 26th 04 07:58 PM


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