?
Solved

Writing cbo value to active cell

Posted on 2010-08-19
2
Medium Priority
?
299 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
Sheils earned 2000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

777 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