Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting the Current Column ?
How do I select the current Column in VBA, so I can then insert a whole new
one to the left of it? Ive got most of the code down, but I cant select a single column for some reason. Help Please Private Sub Update_LRU_List_Click() Dim EBS_LRU_Count As Double Dim Trend_LRU_Count As Double Dim LRU_Diff As Double EBS_LRU_Count = Sheets("BASIC CHART DATA").Range("D6") Trend_LRU_Count = Sheets("BASIC CHART DATA").Range("D7") LRU_Diff = EBS_LRU_Count - Trend_LRU_Count Application.Goto Reference:=Worksheets("Trend Analysis").Range("I5").Offset(0, Trend_LRU_Count), Scroll:=False If LRU_Diff 0 Then For Xnum = 1 To LRU_Diff 'Locates Current Column, depent on Number of Missing LRU's Application.Goto Reference:=Worksheets("Trend Analysis").Range("I5").Offset(0, Xnum + 1), Scroll:=False 'Select Current Column 'INSERT LINE HERE TO SELECT THE WHOLE OF THE CURRENT COLUMN 'Insert a new Column immedaitely to the right of the Current Column Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove ' Populate heading of New Column from LRU List Next End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
selecting current row plus the 2 above | Excel Programming | |||
Selecting dates from current week with Macro | Excel Programming | |||
Selecting Current date | Excel Discussion (Misc queries) | |||
SELECTING CURRENT DATE AT OPENING | Excel Worksheet Functions | |||
selecting current row information and transfering it. | Excel Programming |