Uploading files:Not sure if this is an easy or hard one

Z

zak

Hi

I am creating a form in excel, and one of the prompts on the form is to
browse and upload a file (like any other upload file function where you can
just browse and upload). What i would like to do is to be able to just click
on the 'browse' button and select the file, then for the file path to be
copied into excel as just a hyperlink (so that when you click on that
hyperlink, it will open up the file).

I don't know if this is at all feasable or not...can anyone help/advise me?

Thank you
 
J

JLGWhiz

I can't help you with the browse and select bit, but thought I would point
out that uploading is when you send data to another system and downloading is
when you receive data from another system. I could be wrong but I think you
want to download. You need to be a little more specific about what type of
file liike text or data or chart and where it comes from, like webpage,
access, DB4, other Excel, etc.
 
Z

zak

Hi

Thanks for pointing this out. Having thought about it some more.
Basically, I create a list of actions on an Excel spreadsheet. Then I save
this on a network drive and give it a file name, Upgrade.xls.

Then in a totally different workbook, I have created a simple appointment
system. A form on this appointment system will want the hyperlink for the
file name to be added to Sheet 1, from cell reference H5 onwards, so that
when clicking the hyperlink, the Upgrade.xls document will open up.

Am I making sense? If so, please can you help me in any way.

Thank you very much
 
J

JLGWhiz

I think you could probably use the Worksheet_SelectionChange event to do what
you want withoout the hyperlink. Basically, if the user selects an option in
column H it would open the workbook on the network drive. Sample code below.

Private Sub Worksheet_SelectionChange(ByVal Taget As Range)
Set netWkb = 'network path and filename
Set srcRng = Range("H5:H" & Cells(Rows.Count, 8). _
End(xlUp).Row)
If Not Intersect(Target, srcRng) Is Nothing Then
Workbooks(netWkb).Open
End If
End Sub
 
Z

zak

Hi

Thanks for your response. I have tried to use the code, but the following
line turns red upon saving:

--> Set netWkb = 'network path and filename?

Also, I am not sure what you mean by "when the user selects an option in
column H" because this is where i'd like the hyperlink for the file to go. I
think I am getting confused, but please let me know how to fix the above
line, and maybe it will make sense to me once I see it working.

Thanks Again!
 
Z

zak

Hi

I have sent a mail in response to your code, but you may not have seen it.
There is an error in the code, the first line turns red when the code is run
and cant get it to go away.

This is the line that turns red:

Set netWkb = 'network path and filename

Please let me know if you know what is wrong with the code.

Thanks
 

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

Top