Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Putting text in a cell

OK, I must be missing something obvious here?

Worksheets("Sheet1").Select 'Select sheet1 sheet
Range("A5").Select ' Selects top row below title
Selection.EntireRow.Insert 'Inserts a new row at that point
MsgBox (TextBox1.Value)
Range("A5").Select
TextBox1.Text = ActiveCell.FormulaR1C1 'inserts name
TextBox2.Value = Range("E5").FormulaR1C1 'inserts county

It works fine up to MsgBox..where it displays the *correct* value.
Yet it won't insert it into a cell, using either Range..select then
ActiveCell.. or Range..Formula..

Just blank cells?

What am I missing here?

Thanks,

Ben


--
BWGames
to email change de.news to de-news
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Putting text in a cell

you have your assignments backwards:

Range("A5").Select
ActiveCell.Value = Textbox1.Text
Range("E5").Value = Textbox2.Text

--
Regards,
Tom Ogilvy



"BWGames" wrote in message
...
OK, I must be missing something obvious here?

Worksheets("Sheet1").Select 'Select sheet1 sheet
Range("A5").Select ' Selects top row below title
Selection.EntireRow.Insert 'Inserts a new row at that point
MsgBox (TextBox1.Value)
Range("A5").Select
TextBox1.Text = ActiveCell.FormulaR1C1 'inserts name
TextBox2.Value = Range("E5").FormulaR1C1 'inserts county

It works fine up to MsgBox..where it displays the *correct* value.
Yet it won't insert it into a cell, using either Range..select then
ActiveCell.. or Range..Formula..

Just blank cells?

What am I missing here?

Thanks,

Ben


--
BWGames
to email change de.news to de-news



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
Putting a Snippet of Text in a Cell DeeDeeCee Excel Discussion (Misc queries) 5 July 25th 09 04:10 AM
Putting text into graph Kirsty Charts and Charting in Excel 3 February 24th 09 08:55 PM
Complications putting text into multiple lines within a cell DoubleZ Excel Discussion (Misc queries) 7 July 12th 08 11:56 AM
putting multiple lines of text in one cell Greg Excel Discussion (Misc queries) 2 August 25th 06 05:54 PM
Putting text in a column based on variable text from another colum Jacky D. Excel Discussion (Misc queries) 1 December 16th 04 06:09 PM


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