A worksheet residing on my C drive is also on my company intranet. How do I
make changes to the C drive copy and have the same changes incorporated in
the intranet copy?
A worksheet residing on my C drive is also on my company intranet. How do I
make changes to the C drive copy and have the same changes incorporated in
the intranet copy?
Copy the file after you have saved it?
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Phlashh" <[email protected]> wrote in message
news:[email protected]...
> A worksheet residing on my C drive is also on my company intranet. How do
I
> make changes to the C drive copy and have the same changes incorporated in
> the intranet copy?
Or copy when you save it?
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
'Saves the current file to a backup folder and the default folder
'Note that any backup is overwritten
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs Filename:="intranet path\" & _
ActiveWorkbook.Name
ActiveWorkbook.Save
Application.DisplayAlerts = True
End Sub
Gord Dibben Excel MVP
On Tue, 25 Jan 2005 17:17:35 -0000, "Bob Phillips"
<[email protected]> wrote:
>Copy the file after you have saved it?
>
>--
>
>HTH
>
>RP
>(remove nothere from the email address if mailing direct)
>
>
>"Phlashh" <[email protected]> wrote in message
>news:[email protected]...
>> A worksheet residing on my C drive is also on my company intranet. How do
>I
>> make changes to the C drive copy and have the same changes incorporated in
>> the intranet copy?
>
Thank you Gord, Where would I insert this code? in the primary sheet?
"Gord Dibben" wrote:
> Or copy when you save it?
>
> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
> 'Saves the current file to a backup folder and the default folder
> 'Note that any backup is overwritten
> Application.DisplayAlerts = False
> ActiveWorkbook.SaveCopyAs Filename:="intranet path\" & _
> ActiveWorkbook.Name
> ActiveWorkbook.Save
> Application.DisplayAlerts = True
> End Sub
>
>
> Gord Dibben Excel MVP
>
> On Tue, 25 Jan 2005 17:17:35 -0000, "Bob Phillips"
> <[email protected]> wrote:
>
> >Copy the file after you have saved it?
> >
> >--
> >
> >HTH
> >
> >RP
> >(remove nothere from the email address if mailing direct)
> >
> >
> >"Phlashh" <[email protected]> wrote in message
> >news:[email protected]...
> >> A worksheet residing on my C drive is also on my company intranet. How do
> >I
> >> make changes to the C drive copy and have the same changes incorporated in
> >> the intranet copy?
> >
>
>
Gord,
I meant in the windows environment :-)
Process, not automation!
Bob
"Gord Dibben" <gorddibbATshawDOTca> wrote in message
news:[email protected]...
> Or copy when you save it?
>
> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
> 'Saves the current file to a backup folder and the default folder
> 'Note that any backup is overwritten
> Application.DisplayAlerts = False
> ActiveWorkbook.SaveCopyAs Filename:="intranet path\" & _
> ActiveWorkbook.Name
> ActiveWorkbook.Save
> Application.DisplayAlerts = True
> End Sub
>
>
> Gord Dibben Excel MVP
>
> On Tue, 25 Jan 2005 17:17:35 -0000, "Bob Phillips"
> <[email protected]> wrote:
>
> >Copy the file after you have saved it?
> >
> >--
> >
> >HTH
> >
> >RP
> >(remove nothere from the email address if mailing direct)
> >
> >
> >"Phlashh" <[email protected]> wrote in message
> >news:[email protected]...
> >> A worksheet residing on my C drive is also on my company intranet. How
do
> >I
> >> make changes to the C drive copy and have the same changes incorporated
in
> >> the intranet copy?
> >
>
It would be saved in the ThisWorkbook module.
With workbook open and window maximized, right-click on the Excel icon left of
"File" and select "View Code".
Paste in there.
Note: "intranet path" must be adjusted for your actual path.
Gord
On Tue, 25 Jan 2005 12:25:03 -0800, "phlashh"
<[email protected]> wrote:
>Thank you Gord, Where would I insert this code? in the primary sheet?
>
>"Gord Dibben" wrote:
>
>> Or copy when you save it?
>>
>> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
>> 'Saves the current file to a backup folder and the default folder
>> 'Note that any backup is overwritten
>> Application.DisplayAlerts = False
>> ActiveWorkbook.SaveCopyAs Filename:="intranet path\" & _
>> ActiveWorkbook.Name
>> ActiveWorkbook.Save
>> Application.DisplayAlerts = True
>> End Sub
>>
>>
>> Gord Dibben Excel MVP
>>
>> On Tue, 25 Jan 2005 17:17:35 -0000, "Bob Phillips"
>> <[email protected]> wrote:
>>
>> >Copy the file after you have saved it?
>> >
>> >--
>> >
>> >HTH
>> >
>> >RP
>> >(remove nothere from the email address if mailing direct)
>> >
>> >
>> >"Phlashh" <[email protected]> wrote in message
>> >news:[email protected]...
>> >> A worksheet residing on my C drive is also on my company intranet. How do
>> >I
>> >> make changes to the C drive copy and have the same changes incorporated in
>> >> the intranet copy?
>> >
>>
>>
I knew that<g>
Just offered an alternative for automation in case OP wanted it.
Gord
On Tue, 25 Jan 2005 21:06:24 -0000, "Bob Phillips"
<[email protected]> wrote:
>Gord,
>
>I meant in the windows environment :-)
>
>Process, not automation!
>
>Bob
>
>"Gord Dibben" <gorddibbATshawDOTca> wrote in message
>news:[email protected]...
>> Or copy when you save it?
>>
>> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
>Boolean)
>> 'Saves the current file to a backup folder and the default folder
>> 'Note that any backup is overwritten
>> Application.DisplayAlerts = False
>> ActiveWorkbook.SaveCopyAs Filename:="intranet path\" & _
>> ActiveWorkbook.Name
>> ActiveWorkbook.Save
>> Application.DisplayAlerts = True
>> End Sub
>>
>>
>> Gord Dibben Excel MVP
>>
>> On Tue, 25 Jan 2005 17:17:35 -0000, "Bob Phillips"
>> <[email protected]> wrote:
>>
>> >Copy the file after you have saved it?
>> >
>> >--
>> >
>> >HTH
>> >
>> >RP
>> >(remove nothere from the email address if mailing direct)
>> >
>> >
>> >"Phlashh" <[email protected]> wrote in message
>> >news:[email protected]...
>> >> A worksheet residing on my C drive is also on my company intranet. How
>do
>> >I
>> >> make changes to the C drive copy and have the same changes incorporated
>in
>> >> the intranet copy?
>> >
>>
>
I thought you did, but sometimes it helps to spell out our thoughts for the
originators (just in case <g>).
And anyway, it's good to share a crack between old stagers (ebg>
Bob
"Gord Dibben" <gorddibbATshawDOTca> wrote in message
news:[email protected]...
> I knew that<g>
>
> Just offered an alternative for automation in case OP wanted it.
>
>
> Gord
>
> On Tue, 25 Jan 2005 21:06:24 -0000, "Bob Phillips"
> <[email protected]> wrote:
>
> >Gord,
> >
> >I meant in the windows environment :-)
> >
> >Process, not automation!
> >
> >Bob
> >
> >"Gord Dibben" <gorddibbATshawDOTca> wrote in message
> >news:[email protected]...
> >> Or copy when you save it?
> >>
> >> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
> >Boolean)
> >> 'Saves the current file to a backup folder and the default folder
> >> 'Note that any backup is overwritten
> >> Application.DisplayAlerts = False
> >> ActiveWorkbook.SaveCopyAs Filename:="intranet path\" & _
> >> ActiveWorkbook.Name
> >> ActiveWorkbook.Save
> >> Application.DisplayAlerts = True
> >> End Sub
> >>
> >>
> >> Gord Dibben Excel MVP
> >>
> >> On Tue, 25 Jan 2005 17:17:35 -0000, "Bob Phillips"
> >> <[email protected]> wrote:
> >>
> >> >Copy the file after you have saved it?
> >> >
> >> >--
> >> >
> >> >HTH
> >> >
> >> >RP
> >> >(remove nothere from the email address if mailing direct)
> >> >
> >> >
> >> >"Phlashh" <[email protected]> wrote in message
> >> >news:[email protected]...
> >> >> A worksheet residing on my C drive is also on my company intranet.
How
> >do
> >> >I
> >> >> make changes to the C drive copy and have the same changes
incorporated
> >in
> >> >> the intranet copy?
> >> >
> >>
> >
>
Thank you so much for your help. BUT, I do have another question:
instead of saving the whole workbook to the "backup" drive, how would I just
save one worksheet of a workbook?
"Gord Dibben" wrote:
> I knew that<g>
>
> Just offered an alternative for automation in case OP wanted it.
>
>
> Gord
>
> On Tue, 25 Jan 2005 21:06:24 -0000, "Bob Phillips"
> <[email protected]> wrote:
>
> >Gord,
> >
> >I meant in the windows environment :-)
> >
> >Process, not automation!
> >
> >Bob
> >
> >"Gord Dibben" <gorddibbATshawDOTca> wrote in message
> >news:[email protected]...
> >> Or copy when you save it?
> >>
> >> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
> >Boolean)
> >> 'Saves the current file to a backup folder and the default folder
> >> 'Note that any backup is overwritten
> >> Application.DisplayAlerts = False
> >> ActiveWorkbook.SaveCopyAs Filename:="intranet path\" & _
> >> ActiveWorkbook.Name
> >> ActiveWorkbook.Save
> >> Application.DisplayAlerts = True
> >> End Sub
> >>
> >>
> >> Gord Dibben Excel MVP
> >>
> >> On Tue, 25 Jan 2005 17:17:35 -0000, "Bob Phillips"
> >> <[email protected]> wrote:
> >>
> >> >Copy the file after you have saved it?
> >> >
> >> >--
> >> >
> >> >HTH
> >> >
> >> >RP
> >> >(remove nothere from the email address if mailing direct)
> >> >
> >> >
> >> >"Phlashh" <[email protected]> wrote in message
> >> >news:[email protected]...
> >> >> A worksheet residing on my C drive is also on my company intranet. How
> >do
> >> >I
> >> >> make changes to the C drive copy and have the same changes incorporated
> >in
> >> >> the intranet copy?
> >> >
> >>
> >
>
>
You have to copy the worksheet to a new workbook and save that
Worksheets("Sheet1").Copy
ActiveWorkbook.SaveAs Filename:="myFile.xls"
--
HTH
RP
(remove nothere from the email address if mailing direct)
"phlashh1" <[email protected]> wrote in message
news:[email protected]...
> Thank you so much for your help. BUT, I do have another question:
> instead of saving the whole workbook to the "backup" drive, how would I
just
> save one worksheet of a workbook?
>
> "Gord Dibben" wrote:
>
> > I knew that<g>
> >
> > Just offered an alternative for automation in case OP wanted it.
> >
> >
> > Gord
> >
> > On Tue, 25 Jan 2005 21:06:24 -0000, "Bob Phillips"
> > <[email protected]> wrote:
> >
> > >Gord,
> > >
> > >I meant in the windows environment :-)
> > >
> > >Process, not automation!
> > >
> > >Bob
> > >
> > >"Gord Dibben" <gorddibbATshawDOTca> wrote in message
> > >news:[email protected]...
> > >> Or copy when you save it?
> > >>
> > >> Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
> > >Boolean)
> > >> 'Saves the current file to a backup folder and the default folder
> > >> 'Note that any backup is overwritten
> > >> Application.DisplayAlerts = False
> > >> ActiveWorkbook.SaveCopyAs Filename:="intranet path\" & _
> > >> ActiveWorkbook.Name
> > >> ActiveWorkbook.Save
> > >> Application.DisplayAlerts = True
> > >> End Sub
> > >>
> > >>
> > >> Gord Dibben Excel MVP
> > >>
> > >> On Tue, 25 Jan 2005 17:17:35 -0000, "Bob Phillips"
> > >> <[email protected]> wrote:
> > >>
> > >> >Copy the file after you have saved it?
> > >> >
> > >> >--
> > >> >
> > >> >HTH
> > >> >
> > >> >RP
> > >> >(remove nothere from the email address if mailing direct)
> > >> >
> > >> >
> > >> >"Phlashh" <[email protected]> wrote in message
> > >> >news:[email protected]...
> > >> >> A worksheet residing on my C drive is also on my company intranet.
How
> > >do
> > >> >I
> > >> >> make changes to the C drive copy and have the same changes
incorporated
> > >in
> > >> >> the intranet copy?
> > >> >
> > >>
> > >
> >
> >
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks