PC Review


Reply
Thread Tools Rate Thread

Combo Box linking

 
 
Rick
Guest
Posts: n/a
 
      1st Mar 2008
I have a combo box names Client it contains (First, MI, Last) Names. I would
like to be able to load this box automaticly upon the open of the Workbook,
also need to link the selected name to a text box that needs to be filled in
from another Worksheet based on the Client selected my code is as follows:

On Error GoTo ErrFill
Sheets(InvSht).Activate
Idx2 = 0
With Client
.Clear
End With
Sheets(ActSht).Activate
Idx1 = 3
Set MyCell = ActiveSheet.Range("B3")
Do
If MyCell.Value = "" Then
Exit Do
Else
ClntNme = ActiveSheet.Cells(Idx1, 3).Value & " "
ClntNme = ClntNme & ActiveSheet.Cells(Idx1, 4).Value & " "
ClntNme = ClntNme & ActiveSheet.Cells(Idx1, 2).Value
Idx1 = Idx1 + 1
Sheets(InvSht).Activate
With Client
.AddItem ClntNme
End With
Idx2 = Idx2 + 1
Sheets(ActSht).Activate
Set MyCell = MyCell.Offset(1, 0)
End If
Loop
Any thoughts on how to do this?
 
Reply With Quote
 
 
 
 
Mark Ivey
Guest
Posts: n/a
 
      1st Mar 2008
Rick,

I would like to help, but you just don't have enough information posted
here. Is this for a userform or do you have your controls embedded in a
worksheet?

See if you can list some detail about each control and how you want to
handle the mechanics. Then either myself or someone else in this newsgroup
should be able to help out a bit more.

Worst case, you could email what you have to me and I could hammer out a
fix. Just alter my email address to exclude NOSPAM.

Let me know...

Mark Ivey

"Rick" <(E-Mail Removed)> wrote in message
news:8664504E-FB2F-4911-B98C-(E-Mail Removed)...
> I have a combo box names Client it contains (First, MI, Last) Names. I
> would
> like to be able to load this box automaticly upon the open of the
> Workbook,
> also need to link the selected name to a text box that needs to be filled
> in
> from another Worksheet based on the Client selected my code is as follows:
>
> On Error GoTo ErrFill
> Sheets(InvSht).Activate
> Idx2 = 0
> With Client
> .Clear
> End With
> Sheets(ActSht).Activate
> Idx1 = 3
> Set MyCell = ActiveSheet.Range("B3")
> Do
> If MyCell.Value = "" Then
> Exit Do
> Else
> ClntNme = ActiveSheet.Cells(Idx1, 3).Value & " "
> ClntNme = ClntNme & ActiveSheet.Cells(Idx1, 4).Value & " "
> ClntNme = ClntNme & ActiveSheet.Cells(Idx1, 2).Value
> Idx1 = Idx1 + 1
> Sheets(InvSht).Activate
> With Client
> .AddItem ClntNme
> End With
> Idx2 = Idx2 + 1
> Sheets(ActSht).Activate
> Set MyCell = MyCell.Offset(1, 0)
> End If
> Loop
> Any thoughts on how to do this?


 
Reply With Quote
 
Rick
Guest
Posts: n/a
 
      1st Mar 2008
Mark:
This is all in a Excel Workbook, no forms
sheet1=Invoice,sheet2=Accounts,sheet3=insurance_codes,sheet4=Printed_Invoice.
All of the combo_box's are on the sheet1. The finished product is sheet4.
The data is on sheets 2 & 3.
When selecting the person, I want to link to Printed_Invoice and overlay the
Persons name,address,city,state, as well as having the combo_box be loaded
only once upon the opening of the workbook

"Mark Ivey" wrote:

> Rick,
>
> I would like to help, but you just don't have enough information posted
> here. Is this for a userform or do you have your controls embedded in a
> worksheet?
>
> See if you can list some detail about each control and how you want to
> handle the mechanics. Then either myself or someone else in this newsgroup
> should be able to help out a bit more.
>
> Worst case, you could email what you have to me and I could hammer out a
> fix. Just alter my email address to exclude NOSPAM.
>
> Let me know...
>
> Mark Ivey
>
> "Rick" <(E-Mail Removed)> wrote in message
> news:8664504E-FB2F-4911-B98C-(E-Mail Removed)...
> > I have a combo box names Client it contains (First, MI, Last) Names. I
> > would
> > like to be able to load this box automaticly upon the open of the
> > Workbook,
> > also need to link the selected name to a text box that needs to be filled
> > in
> > from another Worksheet based on the Client selected my code is as follows:
> >
> > On Error GoTo ErrFill
> > Sheets(InvSht).Activate
> > Idx2 = 0
> > With Client
> > .Clear
> > End With
> > Sheets(ActSht).Activate
> > Idx1 = 3
> > Set MyCell = ActiveSheet.Range("B3")
> > Do
> > If MyCell.Value = "" Then
> > Exit Do
> > Else
> > ClntNme = ActiveSheet.Cells(Idx1, 3).Value & " "
> > ClntNme = ClntNme & ActiveSheet.Cells(Idx1, 4).Value & " "
> > ClntNme = ClntNme & ActiveSheet.Cells(Idx1, 2).Value
> > Idx1 = Idx1 + 1
> > Sheets(InvSht).Activate
> > With Client
> > .AddItem ClntNme
> > End With
> > Idx2 = Idx2 + 1
> > Sheets(ActSht).Activate
> > Set MyCell = MyCell.Offset(1, 0)
> > End If
> > Loop
> > Any thoughts on how to do this?

>

 
Reply With Quote
 
Mark Ivey
Guest
Posts: n/a
 
      2nd Mar 2008
Still a bit sticky on the overall information layout. Would you mind sending
me a copy of the file?

Just alter my email address to exclude NOSPAM.

Mark Ivey

"Rick" <(E-Mail Removed)> wrote in message
news:1E2B85E5-43E7-48DD-9792-(E-Mail Removed)...
> Mark:
> This is all in a Excel Workbook, no forms
> sheet1=Invoice,sheet2=Accounts,sheet3=insurance_codes,sheet4=Printed_Invoice.
> All of the combo_box's are on the sheet1. The finished product is sheet4.
> The data is on sheets 2 & 3.
> When selecting the person, I want to link to Printed_Invoice and overlay
> the
> Persons name,address,city,state, as well as having the combo_box be loaded
> only once upon the opening of the workbook
>
> "Mark Ivey" wrote:
>
>> Rick,
>>
>> I would like to help, but you just don't have enough information posted
>> here. Is this for a userform or do you have your controls embedded in a
>> worksheet?
>>
>> See if you can list some detail about each control and how you want to
>> handle the mechanics. Then either myself or someone else in this
>> newsgroup
>> should be able to help out a bit more.
>>
>> Worst case, you could email what you have to me and I could hammer out a
>> fix. Just alter my email address to exclude NOSPAM.
>>
>> Let me know...
>>
>> Mark Ivey
>>
>> "Rick" <(E-Mail Removed)> wrote in message
>> news:8664504E-FB2F-4911-B98C-(E-Mail Removed)...
>> > I have a combo box names Client it contains (First, MI, Last) Names. I
>> > would
>> > like to be able to load this box automaticly upon the open of the
>> > Workbook,
>> > also need to link the selected name to a text box that needs to be
>> > filled
>> > in
>> > from another Worksheet based on the Client selected my code is as
>> > follows:
>> >
>> > On Error GoTo ErrFill
>> > Sheets(InvSht).Activate
>> > Idx2 = 0
>> > With Client
>> > .Clear
>> > End With
>> > Sheets(ActSht).Activate
>> > Idx1 = 3
>> > Set MyCell = ActiveSheet.Range("B3")
>> > Do
>> > If MyCell.Value = "" Then
>> > Exit Do
>> > Else
>> > ClntNme = ActiveSheet.Cells(Idx1, 3).Value & " "
>> > ClntNme = ClntNme & ActiveSheet.Cells(Idx1, 4).Value & " "
>> > ClntNme = ClntNme & ActiveSheet.Cells(Idx1, 2).Value
>> > Idx1 = Idx1 + 1
>> > Sheets(InvSht).Activate
>> > With Client
>> > .AddItem ClntNme
>> > End With
>> > Idx2 = Idx2 + 1
>> > Sheets(ActSht).Activate
>> > Set MyCell = MyCell.Offset(1, 0)
>> > End If
>> > Loop
>> > Any thoughts on how to do this?

>>

 
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
Linking combo box to another Khaledity Microsoft Excel Worksheet Functions 8 12th Sep 2009 10:56 AM
linking a form combo box... results from the combo box to another =?Utf-8?B?VHJleQ==?= Microsoft Excel Misc 1 15th Jul 2007 01:58 AM
Combo Box Linking =?Utf-8?B?bXVsbHk=?= Microsoft Excel Misc 0 1st Dec 2005 03:11 PM
Linking a combo box jimmeh Microsoft Excel Misc 1 22nd Oct 2004 12:16 AM
Linking combo box Stuart Microsoft Access Form Coding 1 8th Apr 2004 01:49 PM


Features
 

Advertising
 

Newsgroups
 


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