How can I automate uploading a file, from my local drive to an intranet folder for which I have write access, using VBA?
For example:
- upload: C:/MyLocalFolder/MyWorkbook1.xls (could be .txt, .zip)
- to: http://red.green.com/MyIntranetFolder/MyWorkbook2.xls
CautionMP and fumei helpfully...
I'm trying to link from a web page to a range in an excel workbook. This works fine in XP home edition with excel 2002. No fuss, no muss:
<html>
<a href="test1.xls#Sheet1!B2">go</a>
</html>
When I try the same html file in XP professional, it opens the file but ignores the sheet & range...
According to Microsoft KB article #197922, you can link from a web page to an Excel range with the following HTML syntax:
<a href="http://sample.microsoft.com/test.xls#Sheet2!MyRange">Third link.</a>
as long as the link is specified with http: and not file:.
You can either use a named range or a...
PHV,
BINGO!
If I locate the .vbs script at D:\Temp it works fine, but my actual path is D:\Documents and Settings\..., so based on your last post, I've revised the code to:
Sub test1()
'This line works fine
Shell "C:\Windows\system32\Calc.exe", 1
'This line now works fine too...
How do you call a vbscript (.vbs file) from VBA?
I tried shell, but it causes an "Invalid procedure call or argument" error.
Sub test1()
'This line works fine
Shell "C:\Windows\system32\Calc.exe", 1
'This line causes an invalid procedure call or argument error
Shell...
niamhc,
In Excel, the functionality you're looking for is on the Main Menu Bar. Try Data / Group and Outline / Group.
In Excel help, type 'group and outline'...look at 'about outlining a worksheet.'
-Argh2.
Tried updated code from another computer, behind a personal firewall, with internet urls -- it works fine and responds immediately:
FileExists equivalent:
?urlisvalid("http://www.tek-tips.com/images/logo.gif")
True
?urlisvalid("http://www.tek-tips.com/images/logo.giffff")
False
FolderExists...
fumei & CautionMP:
Thanks for your replies -- especially the code, which got me testing it right away!
A little testing showed that the error trapping approach is overly accepting...as long as the servername (front of url) is ok, no error is raised, even if the folder and/or file names are...
There are several threads about how to FileExists and FolderExists, etc. but they assume the filespec or folderspec argument is on your computer or on a mapped network drive (e.g., "M:\folder\file.xls"). I get inconsistent or unusable results when applying them to urls (e.g...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.