Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Sprad-Dog
 
Posts: n/a
Default Excel Programming

I need help with a function... I'm trying to enter several data
entries(integers) from a 'User Form' into a range of cells. The entries need
to go from (B44:j79) one at a time - clearing the entry from the 'User Form'
[textbox] after each entry. I can get the data in the first cell (B44), but
it will not advance to the next cell down - or clear the entry after I hit
the <enter key. Here is what I have already:

Private Sub TextBoxEnterData_Change()

Worksheets(2).Select

For Each Cell In Worksheets("Data Sheet").Range("b44:j79")
Range("B44").Value = TextBoxEnterData.Value

If Cell.Value < 0# Then
Cell.Value = Null
End If

Next Cell

End Sub

Can you please help me out??

Thanks!
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

You can't cledar the textbox after each one, else you will just fill the
arry (apart from th first cell) with nothing.

Private Sub TextBoxEnterData_Change()
For Each Cell In Worksheets("Data Sheet").Range("b44:j79")
cell.Value = TextBoxEnterData.Value
Next Cell
TextBoxEnterData.Value

End Sub


--
HTH

Bob Phillips

"Sprad-Dog" wrote in message
...
I need help with a function... I'm trying to enter several data
entries(integers) from a 'User Form' into a range of cells. The entries

need
to go from (B44:j79) one at a time - clearing the entry from the 'User

Form'
[textbox] after each entry. I can get the data in the first cell (B44),

but
it will not advance to the next cell down - or clear the entry after I hit
the <enter key. Here is what I have already:

Private Sub TextBoxEnterData_Change()

Worksheets(2).Select

For Each Cell In Worksheets("Data Sheet").Range("b44:j79")
Range("B44").Value = TextBoxEnterData.Value

If Cell.Value < 0# Then
Cell.Value = Null
End If

Next Cell

End Sub

Can you please help me out??

Thanks!



  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

The line

Range("B44").Value = TextBoxEnterData.Value

needs to be

Cell.Value = TextBoxEnterData.Value



"Sprad-Dog" wrote:

I need help with a function... I'm trying to enter several data
entries(integers) from a 'User Form' into a range of cells. The entries need
to go from (B44:j79) one at a time - clearing the entry from the 'User Form'
[textbox] after each entry. I can get the data in the first cell (B44), but
it will not advance to the next cell down - or clear the entry after I hit
the <enter key. Here is what I have already:

Private Sub TextBoxEnterData_Change()

Worksheets(2).Select

For Each Cell In Worksheets("Data Sheet").Range("b44:j79")
Range("B44").Value = TextBoxEnterData.Value

If Cell.Value < 0# Then
Cell.Value = Null
End If

Next Cell

End Sub

Can you please help me out??

Thanks!

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
Opening two separate instances of Excel Ron Bishop Excel Discussion (Misc queries) 2 August 4th 05 05:30 PM
Stop Excel Rounding Dates leinad512 Excel Discussion (Misc queries) 1 April 20th 05 04:19 PM
Hints And Tips For New Posters In The Excel Newsgroups Gary Brown Excel Worksheet Functions 0 April 15th 05 05:47 PM
Excel Files Acting Weird Anat Excel Discussion (Misc queries) 0 March 29th 05 03:07 AM
Excel 2002 and 2000 co-install. Control Which Starts ? cnuk Excel Discussion (Misc queries) 2 January 17th 05 08:07 PM


All times are GMT +1. The time now is 03:12 PM.

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

About Us

"It's about Microsoft Excel"