When you say you've added a description field to the userform do you mean a
textbox? If so try:
Private Sub CommandButton1_Click()
With ActiveSheet
If Me.OptionButton1 = True Then
.Range("D12").EntireColumn.Insert
.Range("D11").Value = Me.TextBox1.Value
Else
.Range("F12").EntireColumn.Insert
.Range("F11").Value = Me.TextBox1.Value
End If
End With
End Sub
Hope this helps
Rowan
"oberon.black" wrote:
>
> I have the following code linked to a userform:
>
>
> Code:
> --------------------
>
> Private Sub CommandButton1_Click()
> With ActiveSheet
> If Me.OptionButton1 = True Then
> .Range("d12").EntireColumn.Insert
> Else
> .Range("f12").EntireColumn.Insert
> End If
> End With
> End Sub
> Private Sub OptionButton1_Click()
> Me.OptionButton1.Value = True
> End Sub
>
> --------------------
>
>
> I have added a description field to my userform. This field is to add
> a title to the newly created column.
>
> What do I need to add to this code to copy the title out of the
> description of the userform and place it into 'row 11 ' of the column
> the code above inserts?
>
>
> --
> oberon.black
> ------------------------------------------------------------------------
> oberon.black's Profile: http://www.excelforum.com/member.php...o&userid=26732
> View this thread: http://www.excelforum.com/showthread...hreadid=401851
>
>
Bookmarks