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 Still working and still so much to learn


I have the following code to allow me to insert a column before the
column that my cursor is in. I have created a two question userform
that I would like to use with the column insert code.

the first option button on the user form ask "is this an expense"
the second option button ask "is this income"

I want the column to be inserted before column 'D12' if it is an
expense, or before column 'F12' if it is income.

this is the code I currently have

Code:
--------------------

'Select_Insert_Column()
Dim MyRange As Object
' Store the selected range in a variable.
Set MyRange = Selection
' Select the entire column.
Selection.EntireColumn.Select
' Insert Columns in all selected sheets.
Selection.Insert
' Reselect the previously selected cells.
MyRange.Select

--------------------


Can someone please help me modify it so that I can have it perform
correctly according to my choice made by the userform option button.


--
oberon.black
------------------------------------------------------------------------
oberon.black's Profile: http://www.excelforum.com/member.php...o&userid=26732
View this thread: http://www.excelforum.com/showthread...hreadid=401827

 
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
learn vba vinod9111 Excel Discussion (Misc queries) 4 August 3rd 09 01:31 PM
Where to learn AFranco Excel Discussion (Misc queries) 11 March 11th 09 08:03 PM
Learn VB Suleman[_2_] Excel Discussion (Misc queries) 2 May 4th 08 05:11 PM
To learn about VBA Morrigan Excel Discussion (Misc queries) 3 August 9th 05 02:33 PM
How to learn VBA Thrava Excel Discussion (Misc queries) 3 January 8th 05 12:43 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"