Pause a macro to get a User Defined Range.
Posted by Dave on August 09, 2000 3:03 PM
I got some code off of the JWalk.com site and it works for pauseing a macro that I want to sort... . But now I want to use it to permit a user to make a selection, click the 'ok' button and Excel will copy that selection to a new worksheet.
I'm stuck at the point where it makes the selection and then activates that selection as the range to copy.
Here is an example of the mess I'm in:
Application.ScreenUpdating = True
Dim UserRange As Range
Prompt = "Please Make Your Selection"
Title = "Select Your Range"
' Display the Input Box
On Error Resume Next
Set UserRange = Application.InputBox( _
Type:=8) 'Range selection
' Was the Input Box canceled?
If UserRange Is Nothing Then
UserRange.Range("A1") = Output
'This above line is my problem
Sheets("Block Entries Alone").Select
Application.CutCopyMode = False
All that happens is what ever active cell is selected when i run the macro is what gets copied to the "Block Entries Alone" worksheet instead of the selection.