PC Review


Reply
 
 
Joanne
Guest
Posts: n/a
 
      28th Dec 2007
Using MS Excel 2003

I have 2 workbooks open in my Excel window.

Wb1 catches the exported data from QuickBooksPro (in doing this, QB
overwrites any data that is on a worksheet already, precluding my
dumping the export directly onto my template. Ugh!!

Wb2 is my template and is linked to Wb1 to get the data into the cells
to generate my report from the template without messing with my col/row
headings, formulas etc.

Now, when I close Wb1, I want to delete the ws, which will always be
sheet1. I need help with the syntax on this please.

Then, when I close Wb2, I want to dump all of the linked info so my
template is empty and ready for the next time I need to use it. Again,
this is where I need help with the syntax.

Any guidance you can offer will be much appreciated.
Thanks
Joanne

 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      28th Dec 2007
Hi Joanne

If I understand you right, you don't want to save any of the data in
the two workbooks. Assuming that is right, I would save both workbooks
as templates.

File > Save as > Save as type > choose template.

//Per

On 28 Dec., 20:55, Joanne <RobJ...@comcast.net> wrote:
> Using MS Excel 2003
>
> I have 2 workbooks open in my Excel window.
>
> Wb1 catches the exported data from QuickBooksPro (in doing this, QB
> overwrites any data that is on a worksheet already, precluding my
> dumping the export directly onto my template. Ugh!!
>
> Wb2 is my template and is linked to Wb1 to get the data into the cells
> to generate my report from the template without messing with my col/row
> headings, formulas etc.
>
> Now, when I close Wb1, I want to delete the ws, which will always be
> sheet1. I need help with the syntax on this please.
>
> Then, when I close Wb2, I want to dump all of the linked info so my
> template is empty and ready for the next time I need to use it. Again,
> this is where I need help with the syntax.
>
> Any guidance you can offer will be much appreciated.
> Thanks
> Joanne


 
Reply With Quote
 
FSt1
Guest
Posts: n/a
 
      28th Dec 2007
hi
are you going to use WB1 again? If you are you could just close without
saving which would in effect clear the sheet.
another way....
Private Sub Workbook_BeforeClose() 'or BeforeSave()
Sheets("Sheet1").Cells.ClearContents
End Sub
this doesn't delete the sheet, it justs clears all the cells.

as to clearing the template, you will have to do a surgical delete.
Private Sub Workbook_BeforeClose()
Sheets("Sheet1").Range(A1, B2, C3, D4, E5:G10, A5, B6, C7, _
D8, E12:G20, F3, H4).ClearContents
End Sub

The range addresses above were just made up for example purposes only and
have nothing to do with your template. you will have to find all of the range
addresses in your template that you want data cleared out and add them to the
above sample code.

using xp here.
Regards
FSt1
"Joanne" wrote:

> Using MS Excel 2003
>
> I have 2 workbooks open in my Excel window.
>
> Wb1 catches the exported data from QuickBooksPro (in doing this, QB
> overwrites any data that is on a worksheet already, precluding my
> dumping the export directly onto my template. Ugh!!
>
> Wb2 is my template and is linked to Wb1 to get the data into the cells
> to generate my report from the template without messing with my col/row
> headings, formulas etc.
>
> Now, when I close Wb1, I want to delete the ws, which will always be
> sheet1. I need help with the syntax on this please.
>
> Then, when I close Wb2, I want to dump all of the linked info so my
> template is empty and ready for the next time I need to use it. Again,
> this is where I need help with the syntax.
>
> Any guidance you can offer will be much appreciated.
> Thanks
> Joanne
>
>

 
Reply With Quote
 
Joanne
Guest
Posts: n/a
 
      29th Dec 2007
Thank you - this info does it for me I think
Joanne

FSt1 wrote:

> hi
> are you going to use WB1 again? If you are you could just close without
> saving which would in effect clear the sheet.
> another way....
> Private Sub Workbook_BeforeClose() 'or BeforeSave()
> Sheets("Sheet1").Cells.ClearContents
> End Sub
> this doesn't delete the sheet, it justs clears all the cells.
>
> as to clearing the template, you will have to do a surgical delete.
> Private Sub Workbook_BeforeClose()
> Sheets("Sheet1").Range(A1, B2, C3, D4, E5:G10, A5, B6, C7, _
> D8, E12:G20, F3, H4).ClearContents
> End Sub
>
> The range addresses above were just made up for example purposes only and
> have nothing to do with your template. you will have to find all of the range
> addresses in your template that you want data cleared out and add them to the
> above sample code.
>
> using xp here.
> Regards
> FSt1
> "Joanne" wrote:
>
> > Using MS Excel 2003
> >
> > I have 2 workbooks open in my Excel window.
> >
> > Wb1 catches the exported data from QuickBooksPro (in doing this, QB
> > overwrites any data that is on a worksheet already, precluding my
> > dumping the export directly onto my template. Ugh!!
> >
> > Wb2 is my template and is linked to Wb1 to get the data into the cells
> > to generate my report from the template without messing with my col/row
> > headings, formulas etc.
> >
> > Now, when I close Wb1, I want to delete the ws, which will always be
> > sheet1. I need help with the syntax on this please.
> >
> > Then, when I close Wb2, I want to dump all of the linked info so my
> > template is empty and ready for the next time I need to use it. Again,
> > this is where I need help with the syntax.
> >
> > Any guidance you can offer will be much appreciated.
> > Thanks
> > Joanne
> >
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
deletions Martin A Windows Vista Mail 1 29th Nov 2008 06:09 PM
Deletions Clair Windows Vista Mail 11 8th Jul 2008 08:45 PM
deletions =?Utf-8?B?YmFsZGVhZ2xlMTEw?= Windows Vista Mail 3 4th May 2007 10:24 PM
Do not allow Deletions =?Utf-8?B?RG91Z19D?= Microsoft Access Form Coding 6 2nd Aug 2006 10:02 PM
Deletions =?Utf-8?B?Y2xpZnRvbjQw?= Microsoft Word Document Management 0 22nd Sep 2004 03:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:10 PM.