Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Accessing data from combo box from VBA

I set up VBA code to acccess data entered into a combo box on an Excel
spreadsheet. The code in the last line is not working and I can't seem to
locate the proper command in the Help:

Dim cmbComboBox1 As ComboBox
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("Registration")
Set cmbComboBox1 = ws.ComboBox1
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default Accessing data from combo box from VBA

wrote:

i.e.

Dim cmbComboBox1 As Shape
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("Registration")
Set cmbComboBox1 = ws.Shapes.Item("ComboBox1")
cmbComboBox1.OLEFormat.Object.ListFillRange = Range("A1:A10").Address
MsgBox "TopLeftCell" & cmbComboBox1.TopLeftCell.Address
..........

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"rmcompute" wrote:

I set up VBA code to acccess data entered into a combo box on an Excel
spreadsheet. The code in the last line is not working and I can't seem to
locate the proper command in the Help:

Dim cmbComboBox1 As ComboBox
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("Registration")
Set cmbComboBox1 = ws.ComboBox1

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Accessing data from combo box from VBA

Thank you. Can you also indicate how to access the data inside the combo box ?

"chijanzen" wrote:

wrote:

i.e.

Dim cmbComboBox1 As Shape
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("Registration")
Set cmbComboBox1 = ws.Shapes.Item("ComboBox1")
cmbComboBox1.OLEFormat.Object.ListFillRange = Range("A1:A10").Address
MsgBox "TopLeftCell" & cmbComboBox1.TopLeftCell.Address
..........

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"rmcompute" wrote:

I set up VBA code to acccess data entered into a combo box on an Excel
spreadsheet. The code in the last line is not working and I can't seem to
locate the proper command in the Help:

Dim cmbComboBox1 As ComboBox
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("Registration")
Set cmbComboBox1 = ws.ComboBox1

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
accessing data from Access DEI[_2_] Excel Discussion (Misc queries) 1 September 25th 07 04:09 PM
accessing graphics with combo box or drop down list Jono Excel Discussion (Misc queries) 0 March 7th 06 09:36 PM
accessing data in a cell cjsmith22[_5_] Excel Programming 2 November 10th 05 10:54 PM
accessing excel combo box control data from vb .net CoolCyber Excel Programming 2 October 26th 05 04:20 PM
accessing data from an array Tom Ogilvy Excel Programming 5 September 9th 03 04:21 AM


All times are GMT +1. The time now is 01:50 PM.

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

About Us

"It's about Microsoft Excel"