Solved

Writing cbo value to active cell

Posted on 2010-08-19
2
291 Views
Last Modified: 2012-05-10
Hello Experts

The okClick event writes the value selected in cboEquipment on user form to the active cell.  This works fine for the cboEquipment  but the user form has two combos.  How do I add cboEmployees value if that combo is selected instead ?  

Thanks
Private Sub cmdOK_Click()

        ActiveWorkbook.Sheets("DTS").Activate

        Range("C15").Select

    Do

If IsEmpty(ActiveCell) = False Then



        ActiveCell.Offset(1, 0).Select

End If

Loop Until IsEmpty(ActiveCell) = True

    

        ActiveCell.Value = cboEquipment.Value

            

End Sub

Open in new window

0
Comment
Question by:zpotok
2 Comments
 
LVL 16

Accepted Solution

by:
Sheils earned 500 total points
ID: 33479777
You can run the code for the cboEmployees after the loop

Private Sub cmdOK_Click()
        ActiveWorkbook.Sheets("DTS").Activate
        Range("C15").Select
    Do
If IsEmpty(ActiveCell) = False Then

        ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
   
        ActiveCell.Value = cboEquipment.Value

'-----------------------------------------------

ActiveWorkbook.Sheets("DTS").Activate
        Range("C16").Select
    Do
If IsEmpty(ActiveCell) = False Then

        ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
   
        ActiveCell.Value = cboEmployee.Value
           
End Sub
0
 

Author Closing Comment

by:zpotok
ID: 33480009

simple enough....  thanks
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Get the ms access version 4 34
Search field on a form 7 17
Access 2010 report is rearranging data 9 18
Stored Procedure 2 10
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now