ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Extracting value from Combination drop down-edit box (https://www.excelbanter.com/excel-programming/331179-extracting-value-combination-drop-down-edit-box.html)

Mr.Bob

Extracting value from Combination drop down-edit box
 
I'm new at this so please be easy on me. I'm using MS Excel 2000

My problem is I'm tring to extract user information from a Combination drop
down-edit box from the Userform/dialogsheet and place it on a spredsheet. The
cell link for the list control works fine but when the user enters data that
is not in the list I need to extract it. the code I've been using works fine
for a editbox, but does not work for the Combination box. I'm sure it's just
a "KeyWord" Issue, but I'm at a lost for it. I was using the "keyword"
EditBox for extracting the infomation for the edit box what would it be for
the Combination drop down-edit box?

Sample Code:

Sheets("{Sheet Name}").Select
Range("{Cell Name}").Value = DialogSheets("{dialogsheet
name}").EditBoxes("{Control Name}").Text

Thanks..

drhalter

Extracting value from Combination drop down-edit box
 
Bob,

I don't know much about DialogSheets, but this usually works with my
UserForms (assumes the form you have is named UserForm1 and the combobox is
named Combobox1):

Sheets("{Sheet Name}").Select
Range("{Cell Name}").Value = UserForm1.Combobox1.Value

If you are executing the code while the UserForm has the focus, you probably
don't even need to specify UserForm1
Dave



"Mr.Bob" wrote:

I'm new at this so please be easy on me. I'm using MS Excel 2000

My problem is I'm tring to extract user information from a Combination drop
down-edit box from the Userform/dialogsheet and place it on a spredsheet. The
cell link for the list control works fine but when the user enters data that
is not in the list I need to extract it. the code I've been using works fine
for a editbox, but does not work for the Combination box. I'm sure it's just
a "KeyWord" Issue, but I'm at a lost for it. I was using the "keyword"
EditBox for extracting the infomation for the edit box what would it be for
the Combination drop down-edit box?

Sample Code:

Sheets("{Sheet Name}").Select
Range("{Cell Name}").Value = DialogSheets("{dialogsheet
name}").EditBoxes("{Control Name}").Text

Thanks..


Mr.Bob

Extracting value from Combination drop down-edit box
 
That Works fine for userforms environment but not in the DialogSheets
environment. Thanks anyway.

"drhalter" wrote:

Bob,

I don't know much about DialogSheets, but this usually works with my
UserForms (assumes the form you have is named UserForm1 and the combobox is
named Combobox1):

Sheets("{Sheet Name}").Select
Range("{Cell Name}").Value = UserForm1.Combobox1.Value

If you are executing the code while the UserForm has the focus, you probably
don't even need to specify UserForm1
Dave



"Mr.Bob" wrote:

I'm new at this so please be easy on me. I'm using MS Excel 2000

My problem is I'm tring to extract user information from a Combination drop
down-edit box from the Userform/dialogsheet and place it on a spredsheet. The
cell link for the list control works fine but when the user enters data that
is not in the list I need to extract it. the code I've been using works fine
for a editbox, but does not work for the Combination box. I'm sure it's just
a "KeyWord" Issue, but I'm at a lost for it. I was using the "keyword"
EditBox for extracting the infomation for the edit box what would it be for
the Combination drop down-edit box?

Sample Code:

Sheets("{Sheet Name}").Select
Range("{Cell Name}").Value = DialogSheets("{dialogsheet
name}").EditBoxes("{Control Name}").Text

Thanks..



All times are GMT +1. The time now is 01:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com