Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 88
Default Add Value from Textbox to next cell in range

I have a range of cells (say A4:A400). My current plan is to call up a
userform with a button, the userform has a textbox. I want the value of the
textbox to populate the next blank cell in the range of cells when I select.
Anyone have any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 88
Default Add Value from Textbox to next cell in range

This is what I have so far. However, this is leaving a blank cell at the top
of the range but I don't want it to.

Range(A4:A400).Find("", ActiveCell, Searchdirection:=x1Next).Select
ActiveCell.Value =Textbox1.Text

Any other ideas?

"mitch" wrote:

I have a range of cells (say A4:A400). My current plan is to call up a
userform with a button, the userform has a textbox. I want the value of the
textbox to populate the next blank cell in the range of cells when I select.
Anyone have any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Add Value from Textbox to next cell in range

Range("A4:A400").SpecialCells(xlCellTypeBlanks).Ce lls(1).Value =
Textbox1.Text

But if it is a number, you might want to explicitly make it one:

Range("A4:A400").SpecialCells(xlCellTypeBlanks).Ce lls(1).Value =
CDbl(Textbox1.Text)

HTH,
Bernie
MS Excel MVP


"mitch" wrote in message
...
This is what I have so far. However, this is leaving a blank cell at the
top
of the range but I don't want it to.

Range(A4:A400).Find("", ActiveCell, Searchdirection:=x1Next).Select
ActiveCell.Value =Textbox1.Text

Any other ideas?

"mitch" wrote:

I have a range of cells (say A4:A400). My current plan is to call up a
userform with a button, the userform has a textbox. I want the value of
the
textbox to populate the next blank cell in the range of cells when I
select.
Anyone have any ideas?


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
Calculate Textbox value based on another textbox value.doc Tdungate Excel Discussion (Misc queries) 1 February 12th 09 07:11 PM
Calculate Textbox value based on another textbox value Tdungate Excel Discussion (Misc queries) 0 February 12th 09 07:03 PM
Textbox linked to a cell Pilot Excel Discussion (Misc queries) 2 March 29th 08 10:29 AM
VBA cell to textbox [email protected] Excel Discussion (Misc queries) 3 October 22nd 07 07:47 PM
Display Worksheet Range in a Textbox roadkill Excel Discussion (Misc queries) 1 October 19th 07 02:43 PM


All times are GMT +1. The time now is 04:33 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"