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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,215,497
Messages
6,125,158
Members
449,208
Latest member
emmac

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