Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Inserting a combobox

How do I insert a combobox programmatically into a
specific cell, say B4, that exactly fits the size of the
cell?

Stefan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Inserting a combobox

Option Explicit
Sub TestAdd()
AddCombo Range("K5")
End Sub

Sub AddCombo(rTarget As Range)
With rTarget
ActiveSheet.OLEObjects.Add
(ClassType:="Forms.ComboBox.1", _
Link:=False, _
DisplayAsIcon:=False, _
Left:=.Left, _
Top:=.Top, _
Width:=.Width, _
Height:=.Height).Select
rTarget.Select
End With

End Sub


Patrick Molloy
Microsoft Excel MVP


-----Original Message-----
How do I insert a combobox programmatically into a
specific cell, say B4, that exactly fits the size of the
cell?

Stefan
.

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
ComboBox Chris Excel Worksheet Functions 3 June 8th 09 03:22 PM
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
Combobox N.F[_2_] Excel Discussion (Misc queries) 2 August 17th 07 02:05 AM
HELP PLEASE..Inserting combobox (ActiveX control) makes workbook c Inquiringmind Excel Discussion (Misc queries) 0 February 10th 07 11:01 AM
ComboBox Michelle Bryant Excel Programming 2 October 3rd 03 03:13 PM


All times are GMT +1. The time now is 09:37 AM.

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"