Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Input box that ask for web address..

What if the file this time is from a web address
https://something.something.somethin.../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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Input box that ask for web address..

It wouldn't be any different.

--
Regards,
Tom Ogilvy

"Ella" wrote in message
oups.com...
What if the file this time is from a web address

https://something.something.somethin.../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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I input address data into a table in Excel 2007? Fred New Users to Excel 0 June 19th 07 07:15 PM
ADDRESS function - dynamic input cell claytorm Excel Discussion (Misc queries) 1 June 28th 05 02:05 PM
automate input of an address from Outlook into excel Robb Excel Discussion (Misc queries) 0 June 14th 05 09:21 PM
Getting cell address from input box vandenberg p[_2_] Excel Programming 4 May 22nd 05 07:26 PM
Pause macro for user cell address input Ed Haslam Excel Programming 2 September 18th 03 07:53 PM


All times are GMT +1. The time now is 01:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"