VBA Code to autofill inputbox

mwardle

New Member
Joined
Sep 29, 2009
Messages
9
Hello Everyone, hope someone can help

In an Excel workbook I have VBA code which copies various cell data from a "Summary" Worksheet on multiple workbooks which are filled in by multiple other users, the code opens, gets the data from the summary and closes each workbook in turn and cycles through all necessary workbooks until all are done, this code i have working as required, however, now we have added to the multiple workbooks which the users complete an input box which the user is required to add a character string which then selects the various worksheets to make visible (not summary). I have a character string which only opens the Summary sheet in place.

So my question is - what code can i add can to the original VBA code which when it cycles through and opens each individual file can automatically fill in the required string into the Input box and save me from manually typing it in every time it opens a new workbook.

thanks in advance

Mark
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
The third argument (Default) will fill in the inputbox each time it is open.

Code:
Sub test10()
x = InputBox(Prompt:="test", Title:="test", Default:="ABCD")
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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