Open File and Input with Mouse in same VBA

aschaak

New Member
Joined
Feb 5, 2013
Messages
8
I want to open an existing file and prompt the user to use the mouse to indicate where previously selected material should be posted.

My code is

Dim rRange as Range
Dime OpenFileUpdate as String, OpenFile as String, CurWks as String


Windows("CashWorksheet.xlsm").Activate
OpenFileUpdate = Sheets("FileList").Range("H28").Text
OpenFile = Sheets("FileList").Range("H20")
CurWks = Sheets("FileList").Range("H40")

Workbooks.Open filename:=OpenFile

Windows(CurWks).Activate
Sheets("WFCash").Select

Set rRange = Application.InputBox(Prompt:= _
"Please select a cell with your Mouse where Wells Fargo transactions should be inserted.", _
Title:="SPECIFY RANGE", Type:=8)

My problem is the prompt appears on a grey screen. Excel does not open the workbook and does not show the user the data.

This happens when the macro is run. When I step through the code, the display is fine.

I have tried Sleep/Wait to no avail.

I would sincerely appreciate any ideas.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top