Group:  Microsoft Excel ยป microsoft.public.excel.programming
Thread: Uploading files:Not sure if this is an easy or hard one

Uploading files:Not sure if this is an easy or hard one
zak 12/30/2008 11:16:01 PM
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
RE: Uploading files:Not sure if this is an easy or hard one
JLGWhiz 12/30/2008 11:36:02 PM
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.


"zak" wrote:

[Quoted Text]
> 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
RE: Uploading files:Not sure if this is an easy or hard one
zak 12/31/2008 10:35:00 AM
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


"JLGWhiz" wrote:

[Quoted Text]
> 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.
>
>
> "zak" wrote:
>
> > 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
RE: Uploading files:Not sure if this is an easy or hard one
JLGWhiz 12/31/2008 3:41:02 PM
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

"zak" wrote:

[Quoted Text]
> 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
>
>
> "JLGWhiz" wrote:
>
> > 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.
> >
> >
> > "zak" wrote:
> >
> > > 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
RE: Uploading files:Not sure if this is an easy or hard one
zak 12/31/2008 10:00:01 PM
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!

"JLGWhiz" wrote:

[Quoted Text]
> 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
>
> "zak" wrote:
>
> > 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
> >
> >
> > "JLGWhiz" wrote:
> >
> > > 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.
> > >
> > >
> > > "zak" wrote:
> > >
> > > > 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

Home | Search | Terms | Imprint
Newsgroups Reader