LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Assign value of cell based on text box

I currently have a button that, when clicked, will add a
new sheet to the workbook. It will also open a form with
a text box. The intent is to have the user enter text
into the text box and have it appear in cell A1 of the new
sheet. (and eventually have that value become the name of
the sheet). This does not seem to be working correctly.

Here is what I have so far:

Private Sub Cmd_NewSheet_Click()
Load Frm_PStartDate
Frm_PStartDate.Show
Worksheets.Add.Move after:=Worksheets("Start")
Worksheets(2).Range("A1").Value = Txt_PStartDate
End Sub

Private Sub Cmd_Ok1_Click()
Dim Pdate As String
Pdate = Txt_PStartDate.Value
End Sub

Any help is appreciated.

Thanks

S.
 
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
Assign numerical value to cell based on selection from drop-down m Tim Excel Discussion (Misc queries) 1 April 6th 10 08:11 PM
assign next serial number based on contents of another cell clint New Users to Excel 2 August 26th 09 01:57 AM
Assign Color to a Cell based on another Cell on a diff Sheet VROSARIO7 Excel Worksheet Functions 2 July 6th 09 08:53 PM
How can I assign a range starting cell based on a variable locati. feman007 Excel Discussion (Misc queries) 1 March 9th 05 11:41 PM
How can I assign a range starting cell based on a variable locati. feman007 Excel Worksheet Functions 3 March 9th 05 11:40 PM


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