Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have the following code attach to my command button: Code ------------------- Private Sub CommandButton1_Click() If OptionButton1 = True Then Range("cellname").EntireColumn.Insert Worksheets("CGS").Cells(11, Range("cellname").Column - 1).Formula = TextBox1.Value Worksheets("CGS").Cells(10, Range("cellname").Column - 1).Value = CDbl(Calendar1.Value) Else Range("cellname2").EntireColumn.Insert Worksheets("CGS").Cells(11, Range("cellname2").Column - 1).Formula = TextBox1.Value Worksheets("CGS").Cells(10, Range("cellname2").Column - 1).Value = CDbl(Calendar1.Value) End If Unload Me End Sub ------------------- This code allows me to create a column in front of my 'cellname' colum and puts the text I add to 'textbox1' at the top of that column with th date I enter on my calendar. -Problem- I have added some extra textboxex to my userform that will allow me t enter text into specified cells in my worksheet using this code: Code ------------------- range("C10").value = textbox2.text ------------------- I want to add this code to the code above and I want the range cel range code to stay with the insert colum code. So that evrytime I add a new column the text that I enter in t 'textbox2' will go to cell 'c10' in the new column that was jus added. Please help me with this code. Thank you for your suppor -- oberon.blac ----------------------------------------------------------------------- oberon.black's Profile: http://www.excelforum.com/member.php...fo&userid=2673 View this thread: http://www.excelforum.com/showthread.php?threadid=46838 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Modify Toolbar Button Styles | Excel Discussion (Misc queries) | |||
How do I reset the Modify button for ribbon | New Users to Excel | |||
How to modify toolbar button in excel? | Excel Discussion (Misc queries) | |||
How to modify toolbar button in excel? | Excel Discussion (Misc queries) | |||
Macro Button To Modify A Cell's Contents? | Excel Programming |