PC Review


Reply
Thread Tools Rate Thread

Combo Headache

 
 
=?Utf-8?B?WmFhaGly?=
Guest
Posts: n/a
 
      17th Oct 2006
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 With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      17th Oct 2006
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" <(E-Mail Removed)> wrote in message
news:BCAFD7EC-7724-4F1D-B732-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?WmFhaGly?=
Guest
Posts: n/a
 
      18th Oct 2006
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" <(E-Mail Removed)> wrote in message
> news:BCAFD7EC-7724-4F1D-B732-(E-Mail Removed)...
> > 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 With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      18th Oct 2006
That presumably means that your worksheet is not named B, you need to change
that.

You could also change the VBE options (Tools>Options) 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" <(E-Mail Removed)> wrote in message
news:E7B58073-6F78-4A5D-AF8F-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> > news:BCAFD7EC-7724-4F1D-B732-(E-Mail Removed)...
> > > 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 With Quote
 
=?Utf-8?B?WmFhaGly?=
Guest
Posts: n/a
 
      18th Oct 2006
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 (Tools>Options) 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" <(E-Mail Removed)> wrote in message
> news:E7B58073-6F78-4A5D-AF8F-(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > > news:BCAFD7EC-7724-4F1D-B732-(E-Mail Removed)...
> > > > 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 With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      18th Oct 2006
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" <(E-Mail Removed)> wrote in message
news:1B89DC3B-F62A-48B6-85AF-(E-Mail Removed)...
> 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 (Tools>Options) 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" <(E-Mail Removed)> wrote in message
> > news:E7B58073-6F78-4A5D-AF8F-(E-Mail Removed)...
> > > 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" <(E-Mail Removed)> wrote in message
> > > > news:BCAFD7EC-7724-4F1D-B732-(E-Mail Removed)...
> > > > > 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 With Quote
 
=?Utf-8?B?WmFhaGly?=
Guest
Posts: n/a
 
      18th Oct 2006

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" <(E-Mail Removed)> wrote in message
> news:1B89DC3B-F62A-48B6-85AF-(E-Mail Removed)...
> > 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 (Tools>Options) 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" <(E-Mail Removed)> wrote in message
> > > news:E7B58073-6F78-4A5D-AF8F-(E-Mail Removed)...
> > > > 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" <(E-Mail Removed)> wrote in message
> > > > > news:BCAFD7EC-7724-4F1D-B732-(E-Mail Removed)...
> > > > > > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo box headache Jen Microsoft Access Forms 5 24th Nov 2009 12:56 PM
Combo Box headache vanlanjl Microsoft Access Forms 9 23rd Jan 2009 05:59 PM
What a headache! Ian General Discussion 3 25th Nov 2008 11:07 PM
Vista Installation Issues, Headache after Headache =?Utf-8?B?VG9tbXlib3k1MzAw?= Windows Vista General Discussion 0 12th Jun 2006 05:50 PM
Need Help-Combo Box headache =?Utf-8?B?QnJ1Y2UgRC4=?= Microsoft Access 1 17th Mar 2006 07:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:54 PM.