LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #15   Report Post  
Junior Member
 
Posts: 1
Default

I know this is a really old post but I was wondering if anyone could show me how to modify this macro so that the user does not get a choice of where the destination of the column will be (specifically, I want the macro to automatically select cell A2 as the destination.

Thanks in advance!

Here is the code that I would like modified:

Sub Contact_List()

Dim v As Variant
Dim nCol As Long
Dim nRow As Long
Dim rOut As Range
Dim iCol As Long

On Error Resume Next
v = Application.InputBox("Select range to copy", Type:=8).Value
If IsEmpty(v) Then Exit Sub
nRow = UBound(v, 1)
nCol = UBound(v, 2)

Set rOut = Application.InputBox("Select destination", Type:=8).Resize (nRow, 1)
If rOut Is Nothing Then Exit Sub

For iCol = 1 To nCol
rOut.Value = WorksheetFunction.Index(v, 0, iCol)
Set rOut = rOut.Offset(nRow)
Next iCol

End Sub


 
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
Pastying From web issues: 1 column Jason W New Users to Excel 3 August 9th 08 07:03 PM
2-Column ComboBox Issues Justin[_14_] Excel Programming 4 September 14th 06 10:04 PM
multi-column listbox on userform, multiple issues KR Excel Programming 2 February 15th 06 07:55 PM
Array issues Tobro88 Excel Worksheet Functions 1 December 6th 05 11:24 PM
String array issues. Need help... John Guderian Excel Programming 1 August 12th 05 08:00 PM


All times are GMT +1. The time now is 11:16 AM.

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"