Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Entering data from a userform into multiple sheets

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
entering data into multiple sheets Ranae Excel Programming 9 January 13th 10 01:13 PM
Entering Userform data to worksheet [email protected] Excel Programming 2 July 18th 08 11:26 AM
Finding blank row and entering data in row from userform MAWII Excel Programming 3 June 12th 07 11:16 PM
Userform Entering Data to a spreadsheet nir020 Excel Programming 0 November 16th 06 06:40 PM
entering same formula in multiple sheets AB Excel Worksheet Functions 1 October 30th 06 08:21 PM


All times are GMT +1. The time now is 01:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"