Input box that ask for web address..

  • Thread starter Thread starter Ella
  • Start date Start date
E

Ella

What if the file this time is from a web address
https://something.something.something.edu/~something/something/filename.more
verbage.something.123456.xlsl

How do i go about asking the macro to run the input box. Or do i just
have to save it as an excel file first and just run the following
statemnt.?

If the file and its location were something like

"C:\MyFolder\Myfilenamestart123456.xls" then you could use:

Sub OpenFile()
Dim title as String, ans as String
Title = "Q:\Daily\Weekly and HBI reports"
ans = InputBox("Enter the 6 digit number")
if len(ans) <> 6 or not isnumeric(ans) then
msgbox "Incorrect, try again"
exit sub
End if

Workbooks.Open Title & ans & ".xls"
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top