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: 1
Default Modify Command Button


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
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
Modify Toolbar Button Styles saminam Excel Discussion (Misc queries) 1 July 14th 07 01:56 AM
How do I reset the Modify button for ribbon ken New Users to Excel 1 May 6th 07 09:41 PM
How to modify toolbar button in excel? Reed Excel Discussion (Misc queries) 0 March 28th 07 02:08 AM
How to modify toolbar button in excel? JLatham Excel Discussion (Misc queries) 0 March 28th 07 12:55 AM
Macro Button To Modify A Cell's Contents? Virtanis Excel Programming 10 February 27th 04 08:51 PM


All times are GMT +1. The time now is 05:22 PM.

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"