Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you so much for your keen eye, and your quick reply!
"JLGWhiz" wrote: Sheets("Purchased Phones").Active Could be the above line of code is the problem. Try Activate instead of Active. "Edu" wrote in message ... I have created a userform. And depending on the value of a particular drop down menu, the data will be entered into multiple sheets. I have used an if statement to attempt this, but i get an error when i run it. (run-time error '438': Object doesn't support this property or method) Please assist me with this, i am brand new to programming. Thanks in Advance. My code: Private Sub savdata_Click() ' set form to workbook ActiveWorkbook.Sheets("Feb2010").Activate Range("A1").Select 'find and empty cell Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True ' enter data from form to wooksheet ActiveCell.Value = dateText.Value ActiveCell.Offset(0, 1) = ComboBox1.Value ActiveCell.Offset(0, 2) = CmbPerson.Value ActiveCell.Offset(0, 3) = CmbAcct.Value ActiveCell.Offset(0, 4) = itemNum.Value ActiveCell.Offset(0, 5) = debBox.Value ActiveCell.Offset(0, 6) = credBox.Value ActiveCell.Offset(0, 7) = desBox.Value ' add data to Purchased Phones Sheet _ if Transaction drop down menu equals purchased phone If ComboBox1.Value = "Purchased Item" Then Sheets("Purchased Phones").Active Range("A1").Select Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True ' enter data from form ActiveCell.Offset(0, 1) = Date End If 'clear the data in form dateText.Value = Date CmbPerson.Value = "" CmbAcct.Value = "" itemNum.Value = "" debBox.Value = "" credBox.Value = "" desBox.Value = "" End Sub . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
entering data into multiple sheets | Excel Programming | |||
Entering Userform data to worksheet | Excel Programming | |||
Finding blank row and entering data in row from userform | Excel Programming | |||
Userform Entering Data to a spreadsheet | Excel Programming | |||
entering same formula in multiple sheets | Excel Worksheet Functions |