Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Combo Headache

hey
I have a 2 workbooks A & B. A cntains a userform with a combobox. The
combobox needs to display data on B colA.
please guide me in doing this!!!!
Regards

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Combo Headache

Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100")
End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zaahir" wrote in message
...
hey
I have a 2 workbooks A & B. A cntains a userform with a combobox. The
combobox needs to display data on B colA.
please guide me in doing this!!!!
Regards



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Combo Headache

Hi
when adding this code into "Private Sub UserForm_Initialize()" the button

Private Sub cmdNewEntry_Click()
UserForm1.Show
End Sub
returns with an error code "Run-time error 9" "Subscript out of range"
is the code for the button in the wrong place?

"Bob Phillips" wrote:

Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100")
End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zaahir" wrote in message
...
hey
I have a 2 workbooks A & B. A cntains a userform with a combobox. The
combobox needs to display data on B colA.
please guide me in doing this!!!!
Regards




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Combo Headache

That presumably means that your worksheet is not named B, you need to change
that.

You could also change the VBE options (ToolsOptions) to break on all errors
(on the General tab, Errors frame) so you see the real error.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zaahir" wrote in message
...
Hi
when adding this code into "Private Sub UserForm_Initialize()" the button

Private Sub cmdNewEntry_Click()
UserForm1.Show
End Sub
returns with an error code "Run-time error 9" "Subscript out of range"
is the code for the button in the wrong place?

"Bob Phillips" wrote:

Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100")
End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zaahir" wrote in message
...
hey
I have a 2 workbooks A & B. A cntains a userform with a combobox. The
combobox needs to display data on B colA.
please guide me in doing this!!!!
Regards






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Combo Headache

i hav changed it to the name of the workbook and the sheet, & thats the error
msg returnd as well as the error setting on the options!!!!!!

"Bob Phillips" wrote:

That presumably means that your worksheet is not named B, you need to change
that.

You could also change the VBE options (ToolsOptions) to break on all errors
(on the General tab, Errors frame) so you see the real error.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zaahir" wrote in message
...
Hi
when adding this code into "Private Sub UserForm_Initialize()" the button

Private Sub cmdNewEntry_Click()
UserForm1.Show
End Sub
returns with an error code "Run-time error 9" "Subscript out of range"
is the code for the button in the wrong place?

"Bob Phillips" wrote:

Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100")
End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zaahir" wrote in message
...
hey
I have a 2 workbooks A & B. A cntains a userform with a combobox. The
combobox needs to display data on B colA.
please guide me in doing this!!!!
Regards









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Combo Headache

Sorry, I missed a vital part

Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100").Address(, , ,
True)
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zaahir" wrote in message
...
i hav changed it to the name of the workbook and the sheet, & thats the

error
msg returnd as well as the error setting on the options!!!!!!

"Bob Phillips" wrote:

That presumably means that your worksheet is not named B, you need to

change
that.

You could also change the VBE options (ToolsOptions) to break on all

errors
(on the General tab, Errors frame) so you see the real error.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zaahir" wrote in message
...
Hi
when adding this code into "Private Sub UserForm_Initialize()" the

button

Private Sub cmdNewEntry_Click()
UserForm1.Show
End Sub
returns with an error code "Run-time error 9" "Subscript out of range"
is the code for the button in the wrong place?

"Bob Phillips" wrote:

Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100")
End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zaahir" wrote in message
...
hey
I have a 2 workbooks A & B. A cntains a userform with a combobox.

The
combobox needs to display data on B colA.
please guide me in doing this!!!!
Regards









  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Combo Headache


hi
kay no prob...
i still cant get it to run, but opted to create a sheet2,named DB & set the
rowsource property to DB!"Range", this helps but now evry1 can see the
database..... Any ideas on how to hide the data or protect it via code or do
u think i should opt for the easiest route "password protection"
"Bob Phillips" wrote:

Sorry, I missed a vital part

Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100").Address(, , ,
True)
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zaahir" wrote in message
...
i hav changed it to the name of the workbook and the sheet, & thats the

error
msg returnd as well as the error setting on the options!!!!!!

"Bob Phillips" wrote:

That presumably means that your worksheet is not named B, you need to

change
that.

You could also change the VBE options (ToolsOptions) to break on all

errors
(on the General tab, Errors frame) so you see the real error.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zaahir" wrote in message
...
Hi
when adding this code into "Private Sub UserForm_Initialize()" the

button

Private Sub cmdNewEntry_Click()
UserForm1.Show
End Sub
returns with an error code "Run-time error 9" "Subscript out of range"
is the code for the button in the wrong place?

"Bob Phillips" wrote:

Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100")
End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zaahir" wrote in message
...
hey
I have a 2 workbooks A & B. A cntains a userform with a combobox.

The
combobox needs to display data on B colA.
please guide me in doing this!!!!
Regards










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
Lookup headache [email protected] Excel Programming 5 March 24th 06 07:06 PM
headache! :) unique_id's cjjoo Excel Worksheet Functions 7 October 21st 05 03:24 AM
Hyperlink Headache Fowler_ko Excel Programming 1 November 15th 04 05:18 PM
AND Headache (with dates)! Alan L. Wagoner Excel Programming 2 February 19th 04 03:41 PM
Look up Headache Chris Excel Programming 3 November 26th 03 02:55 PM


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