Run time Error '1004

I have a macro to run right before the workbook closes.  It is as
follows:


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Range("A1").Select
ActiveSheet.ShowAllData
ActiveWorkbook.Save
End Sub

The top row has the autofilter on.  If the data is not filtered then
when the macro runs it throws a Run Time Error '1004'.  If it is
filtered the Macro runs fine.

I can't seems to find the right code to get the macro to end if it
errors out.  I think it would be an if then statement but my coding
skills aren't quite up the par.

Any help would be great.  Thanks in advance.

Jacob

0
appose (17)
6/1/2006 6:51:34 PM
excel 39879 articles. 2 followers. Follow

8 Replies
551 Views

Similar Articles

[PageSpeed] 1

    With ActiveSheet
        If .FilterMode Then
           .ShowAllData
        End If
    End With

Will avoid the problem--as will:

    on error resume next
    activesheet.showalldata
    on error goto 0

And I think I'd be more specific than using Activesheet.  Maybe:

    With me.worksheets("sheet9999")        
        .select
        .range("a1").select
        If .FilterMode Then
           .ShowAllData
        End If
    End With

just in case the wrong sheet was active.

And I'd use:
Me.Save
instead of:
ActiveWorkbook.Save

Me refers to the thing holding the code--in this case, it's ThisWorkbook.

========
But what happens if a user opens the workbook, messes it up beyond belief and
wants to close without saving?

Your code will save his/her changes and that may not be good.

Have you thought of putting the equivalent code in the Workbook_open event so
that things are set up when the workbook opens instead?

Jacob wrote:
> 
> I have a macro to run right before the workbook closes.  It is as
> follows:
> 
> Private Sub Workbook_BeforeClose(Cancel As Boolean)
> Range("A1").Select
> ActiveSheet.ShowAllData
> ActiveWorkbook.Save
> End Sub
> 
> The top row has the autofilter on.  If the data is not filtered then
> when the macro runs it throws a Run Time Error '1004'.  If it is
> filtered the Macro runs fine.
> 
> I can't seems to find the right code to get the macro to end if it
> errors out.  I think it would be an if then statement but my coding
> skills aren't quite up the par.
> 
> Any help would be great.  Thanks in advance.
> 
> Jacob

-- 

Dave Peterson
0
petersod (12004)
6/1/2006 8:20:08 PM
All of these solutions worked great. Thanks!!  I have thought about
putting the code when the workbook opens, but then I want to get around
not having to click the "Do you want to save Changes" when I go to
close out the workbook.  Is there a way to surpass the dialog box?  All
that the worksheet contain is like a contact list, plus I am the only
one currently using it.  If I were to share the workbook I guess I give
read only access to it.  Any suggestion???

Thanks,

Jacob

Dave Peterson wrote:
> With ActiveSheet
>         If .FilterMode Then
>            .ShowAllData
>         End If
>     End With
>
> Will avoid the problem--as will:
>
>     on error resume next
>     activesheet.showalldata
>     on error goto 0
>
> And I think I'd be more specific than using Activesheet.  Maybe:
>
>     With me.worksheets("sheet9999")
>         .select
>         .range("a1").select
>         If .FilterMode Then
>            .ShowAllData
>         End If
>     End With
>
> just in case the wrong sheet was active.
>
> And I'd use:
> Me.Save
> instead of:
> ActiveWorkbook.Save
>
> Me refers to the thing holding the code--in this case, it's ThisWorkbook.
>
> ========
> But what happens if a user opens the workbook, messes it up beyond belief and
> wants to close without saving?
>
> Your code will save his/her changes and that may not be good.
>
> Have you thought of putting the equivalent code in the Workbook_open event so
> that things are set up when the workbook opens instead?
>
> Jacob wrote:
> >
> > I have a macro to run right before the workbook closes.  It is as
> > follows:
> >
> > Private Sub Workbook_BeforeClose(Cancel As Boolean)
> > Range("A1").Select
> > ActiveSheet.ShowAllData
> > ActiveWorkbook.Save
> > End Sub
> >
> > The top row has the autofilter on.  If the data is not filtered then
> > when the macro runs it throws a Run Time Error '1004'.  If it is
> > filtered the Macro runs fine.
> >
> > I can't seems to find the right code to get the macro to end if it
> > errors out.  I think it would be an if then statement but my coding
> > skills aren't quite up the par.
> >
> > Any help would be great.  Thanks in advance.
> > 
> > Jacob
> 
> -- 
> 
> Dave Peterson

0
appose (17)
6/1/2006 8:36:23 PM
If you just want to not show the dialog there are a few ways you can do it

Application.DisplayAlerts=False

(True before your code exits)

Activeworkbook.Saved=True

Activeworkbook.Save

-- 
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS


"Jacob" <appose@gmail.com> wrote in message 
news:1149194183.813737.187780@f6g2000cwb.googlegroups.com...
> All of these solutions worked great. Thanks!!  I have thought about
> putting the code when the workbook opens, but then I want to get around
> not having to click the "Do you want to save Changes" when I go to
> close out the workbook.  Is there a way to surpass the dialog box?  All
> that the worksheet contain is like a contact list, plus I am the only
> one currently using it.  If I were to share the workbook I guess I give
> read only access to it.  Any suggestion???
>
> Thanks,
>
> Jacob
>
> Dave Peterson wrote:
>> With ActiveSheet
>>         If .FilterMode Then
>>            .ShowAllData
>>         End If
>>     End With
>>
>> Will avoid the problem--as will:
>>
>>     on error resume next
>>     activesheet.showalldata
>>     on error goto 0
>>
>> And I think I'd be more specific than using Activesheet.  Maybe:
>>
>>     With me.worksheets("sheet9999")
>>         .select
>>         .range("a1").select
>>         If .FilterMode Then
>>            .ShowAllData
>>         End If
>>     End With
>>
>> just in case the wrong sheet was active.
>>
>> And I'd use:
>> Me.Save
>> instead of:
>> ActiveWorkbook.Save
>>
>> Me refers to the thing holding the code--in this case, it's ThisWorkbook.
>>
>> ========
>> But what happens if a user opens the workbook, messes it up beyond belief 
>> and
>> wants to close without saving?
>>
>> Your code will save his/her changes and that may not be good.
>>
>> Have you thought of putting the equivalent code in the Workbook_open 
>> event so
>> that things are set up when the workbook opens instead?
>>
>> Jacob wrote:
>> >
>> > I have a macro to run right before the workbook closes.  It is as
>> > follows:
>> >
>> > Private Sub Workbook_BeforeClose(Cancel As Boolean)
>> > Range("A1").Select
>> > ActiveSheet.ShowAllData
>> > ActiveWorkbook.Save
>> > End Sub
>> >
>> > The top row has the autofilter on.  If the data is not filtered then
>> > when the macro runs it throws a Run Time Error '1004'.  If it is
>> > filtered the Macro runs fine.
>> >
>> > I can't seems to find the right code to get the macro to end if it
>> > errors out.  I think it would be an if then statement but my coding
>> > skills aren't quite up the par.
>> >
>> > Any help would be great.  Thanks in advance.
>> >
>> > Jacob
>>
>> -- 
>>
>> Dave Peterson
> 


0
6/1/2006 8:44:50 PM
At the bottom of the workbook_open code, you can add a line that "lies" to
excel.

me.saved = true

This tells excel to treat the workbook like it's just been saved/never updated.



Jacob wrote:
> 
> All of these solutions worked great. Thanks!!  I have thought about
> putting the code when the workbook opens, but then I want to get around
> not having to click the "Do you want to save Changes" when I go to
> close out the workbook.  Is there a way to surpass the dialog box?  All
> that the worksheet contain is like a contact list, plus I am the only
> one currently using it.  If I were to share the workbook I guess I give
> read only access to it.  Any suggestion???
> 
> Thanks,
> 
> Jacob
> 
> Dave Peterson wrote:
> > With ActiveSheet
> >         If .FilterMode Then
> >            .ShowAllData
> >         End If
> >     End With
> >
> > Will avoid the problem--as will:
> >
> >     on error resume next
> >     activesheet.showalldata
> >     on error goto 0
> >
> > And I think I'd be more specific than using Activesheet.  Maybe:
> >
> >     With me.worksheets("sheet9999")
> >         .select
> >         .range("a1").select
> >         If .FilterMode Then
> >            .ShowAllData
> >         End If
> >     End With
> >
> > just in case the wrong sheet was active.
> >
> > And I'd use:
> > Me.Save
> > instead of:
> > ActiveWorkbook.Save
> >
> > Me refers to the thing holding the code--in this case, it's ThisWorkbook.
> >
> > ========
> > But what happens if a user opens the workbook, messes it up beyond belief and
> > wants to close without saving?
> >
> > Your code will save his/her changes and that may not be good.
> >
> > Have you thought of putting the equivalent code in the Workbook_open event so
> > that things are set up when the workbook opens instead?
> >
> > Jacob wrote:
> > >
> > > I have a macro to run right before the workbook closes.  It is as
> > > follows:
> > >
> > > Private Sub Workbook_BeforeClose(Cancel As Boolean)
> > > Range("A1").Select
> > > ActiveSheet.ShowAllData
> > > ActiveWorkbook.Save
> > > End Sub
> > >
> > > The top row has the autofilter on.  If the data is not filtered then
> > > when the macro runs it throws a Run Time Error '1004'.  If it is
> > > filtered the Macro runs fine.
> > >
> > > I can't seems to find the right code to get the macro to end if it
> > > errors out.  I think it would be an if then statement but my coding
> > > skills aren't quite up the par.
> > >
> > > Any help would be great.  Thanks in advance.
> > >
> > > Jacob
> >
> > --
> >
> > Dave Peterson

-- 

Dave Peterson
0
petersod (12004)
6/1/2006 8:57:55 PM
Dave,

The me.saved = true worked fine if I didn't try to filter anything.
Once I did it ask me to save. Any other ideas?

Thanks,

Jacob


Dave Peterson wrote:
> At the bottom of the workbook_open code, you can add a line that "lies" to
> excel.
>
> me.saved = true
>
> This tells excel to treat the workbook like it's just been saved/never updated.
>
>
>
> Jacob wrote:
> >
> > All of these solutions worked great. Thanks!!  I have thought about
> > putting the code when the workbook opens, but then I want to get around
> > not having to click the "Do you want to save Changes" when I go to
> > close out the workbook.  Is there a way to surpass the dialog box?  All
> > that the worksheet contain is like a contact list, plus I am the only
> > one currently using it.  If I were to share the workbook I guess I give
> > read only access to it.  Any suggestion???
> >
> > Thanks,
> >
> > Jacob
> >
> > Dave Peterson wrote:
> > > With ActiveSheet
> > >         If .FilterMode Then
> > >            .ShowAllData
> > >         End If
> > >     End With
> > >
> > > Will avoid the problem--as will:
> > >
> > >     on error resume next
> > >     activesheet.showalldata
> > >     on error goto 0
> > >
> > > And I think I'd be more specific than using Activesheet.  Maybe:
> > >
> > >     With me.worksheets("sheet9999")
> > >         .select
> > >         .range("a1").select
> > >         If .FilterMode Then
> > >            .ShowAllData
> > >         End If
> > >     End With
> > >
> > > just in case the wrong sheet was active.
> > >
> > > And I'd use:
> > > Me.Save
> > > instead of:
> > > ActiveWorkbook.Save
> > >
> > > Me refers to the thing holding the code--in this case, it's ThisWorkbook.
> > >
> > > ========
> > > But what happens if a user opens the workbook, messes it up beyond belief and
> > > wants to close without saving?
> > >
> > > Your code will save his/her changes and that may not be good.
> > >
> > > Have you thought of putting the equivalent code in the Workbook_open event so
> > > that things are set up when the workbook opens instead?
> > >
> > > Jacob wrote:
> > > >
> > > > I have a macro to run right before the workbook closes.  It is as
> > > > follows:
> > > >
> > > > Private Sub Workbook_BeforeClose(Cancel As Boolean)
> > > > Range("A1").Select
> > > > ActiveSheet.ShowAllData
> > > > ActiveWorkbook.Save
> > > > End Sub
> > > >
> > > > The top row has the autofilter on.  If the data is not filtered then
> > > > when the macro runs it throws a Run Time Error '1004'.  If it is
> > > > filtered the Macro runs fine.
> > > >
> > > > I can't seems to find the right code to get the macro to end if it
> > > > errors out.  I think it would be an if then statement but my coding
> > > > skills aren't quite up the par.
> > > >
> > > > Any help would be great.  Thanks in advance.
> > > >
> > > > Jacob
> > >
> > > --
> > >
> > > Dave Peterson
> 
> -- 
> 
> Dave Peterson

0
appose (17)
6/1/2006 9:08:55 PM
Once you make a change (filtering included), you've made excel think that there
was a change.

If you really, really want to avoid this (I wouldn't want to), you could use:

Option Explicit
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Me.Saved = True
End Sub

Remember that you'll have to save the workbook (file|Save) to save any changes
you make.  Else you'll be making those changes again.

Jacob wrote:
> 
> Dave,
> 
> The me.saved = true worked fine if I didn't try to filter anything.
> Once I did it ask me to save. Any other ideas?
> 
> Thanks,
> 
> Jacob
> 
> Dave Peterson wrote:
> > At the bottom of the workbook_open code, you can add a line that "lies" to
> > excel.
> >
> > me.saved = true
> >
> > This tells excel to treat the workbook like it's just been saved/never updated.
> >
> >
> >
> > Jacob wrote:
> > >
> > > All of these solutions worked great. Thanks!!  I have thought about
> > > putting the code when the workbook opens, but then I want to get around
> > > not having to click the "Do you want to save Changes" when I go to
> > > close out the workbook.  Is there a way to surpass the dialog box?  All
> > > that the worksheet contain is like a contact list, plus I am the only
> > > one currently using it.  If I were to share the workbook I guess I give
> > > read only access to it.  Any suggestion???
> > >
> > > Thanks,
> > >
> > > Jacob
> > >
> > > Dave Peterson wrote:
> > > > With ActiveSheet
> > > >         If .FilterMode Then
> > > >            .ShowAllData
> > > >         End If
> > > >     End With
> > > >
> > > > Will avoid the problem--as will:
> > > >
> > > >     on error resume next
> > > >     activesheet.showalldata
> > > >     on error goto 0
> > > >
> > > > And I think I'd be more specific than using Activesheet.  Maybe:
> > > >
> > > >     With me.worksheets("sheet9999")
> > > >         .select
> > > >         .range("a1").select
> > > >         If .FilterMode Then
> > > >            .ShowAllData
> > > >         End If
> > > >     End With
> > > >
> > > > just in case the wrong sheet was active.
> > > >
> > > > And I'd use:
> > > > Me.Save
> > > > instead of:
> > > > ActiveWorkbook.Save
> > > >
> > > > Me refers to the thing holding the code--in this case, it's ThisWorkbook.
> > > >
> > > > ========
> > > > But what happens if a user opens the workbook, messes it up beyond belief and
> > > > wants to close without saving?
> > > >
> > > > Your code will save his/her changes and that may not be good.
> > > >
> > > > Have you thought of putting the equivalent code in the Workbook_open event so
> > > > that things are set up when the workbook opens instead?
> > > >
> > > > Jacob wrote:
> > > > >
> > > > > I have a macro to run right before the workbook closes.  It is as
> > > > > follows:
> > > > >
> > > > > Private Sub Workbook_BeforeClose(Cancel As Boolean)
> > > > > Range("A1").Select
> > > > > ActiveSheet.ShowAllData
> > > > > ActiveWorkbook.Save
> > > > > End Sub
> > > > >
> > > > > The top row has the autofilter on.  If the data is not filtered then
> > > > > when the macro runs it throws a Run Time Error '1004'.  If it is
> > > > > filtered the Macro runs fine.
> > > > >
> > > > > I can't seems to find the right code to get the macro to end if it
> > > > > errors out.  I think it would be an if then statement but my coding
> > > > > skills aren't quite up the par.
> > > > >
> > > > > Any help would be great.  Thanks in advance.
> > > > >
> > > > > Jacob
> > > >
> > > > --
> > > >
> > > > Dave Peterson
> >
> > --
> >
> > Dave Peterson

-- 

Dave Peterson
0
petersod (12004)
6/1/2006 9:32:53 PM
Ok, I did some playing around and here is what I came up with you can
tell me if it is right or not.  I hadn't a second macro for the close
procedure so now I have two macros.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Me.Saved = True
End Sub

Private Sub Workbook_Open()
  With Me.Worksheets("Current Revised")
        .Select
        .Range("a1").Select
        If .FilterMode Then
           .ShowAllData
        End If
    End With
Me.Saved = True
End Sub

This seems to work alright to me.  Let me know what you think.

Thanks,

Jacob

Jacob wrote:
> Dave,
>
> The me.saved = true worked fine if I didn't try to filter anything.
> Once I did it ask me to save. Any other ideas?
>
> Thanks,
>
> Jacob
>
>
> Dave Peterson wrote:
> > At the bottom of the workbook_open code, you can add a line that "lies" to
> > excel.
> >
> > me.saved = true
> >
> > This tells excel to treat the workbook like it's just been saved/never updated.
> >
> >
> >
> > Jacob wrote:
> > >
> > > All of these solutions worked great. Thanks!!  I have thought about
> > > putting the code when the workbook opens, but then I want to get around
> > > not having to click the "Do you want to save Changes" when I go to
> > > close out the workbook.  Is there a way to surpass the dialog box?  All
> > > that the worksheet contain is like a contact list, plus I am the only
> > > one currently using it.  If I were to share the workbook I guess I give
> > > read only access to it.  Any suggestion???
> > >
> > > Thanks,
> > >
> > > Jacob
> > >
> > > Dave Peterson wrote:
> > > > With ActiveSheet
> > > >         If .FilterMode Then
> > > >            .ShowAllData
> > > >         End If
> > > >     End With
> > > >
> > > > Will avoid the problem--as will:
> > > >
> > > >     on error resume next
> > > >     activesheet.showalldata
> > > >     on error goto 0
> > > >
> > > > And I think I'd be more specific than using Activesheet.  Maybe:
> > > >
> > > >     With me.worksheets("sheet9999")
> > > >         .select
> > > >         .range("a1").select
> > > >         If .FilterMode Then
> > > >            .ShowAllData
> > > >         End If
> > > >     End With
> > > >
> > > > just in case the wrong sheet was active.
> > > >
> > > > And I'd use:
> > > > Me.Save
> > > > instead of:
> > > > ActiveWorkbook.Save
> > > >
> > > > Me refers to the thing holding the code--in this case, it's ThisWorkbook.
> > > >
> > > > ========
> > > > But what happens if a user opens the workbook, messes it up beyond belief and
> > > > wants to close without saving?
> > > >
> > > > Your code will save his/her changes and that may not be good.
> > > >
> > > > Have you thought of putting the equivalent code in the Workbook_open event so
> > > > that things are set up when the workbook opens instead?
> > > >
> > > > Jacob wrote:
> > > > >
> > > > > I have a macro to run right before the workbook closes.  It is as
> > > > > follows:
> > > > >
> > > > > Private Sub Workbook_BeforeClose(Cancel As Boolean)
> > > > > Range("A1").Select
> > > > > ActiveSheet.ShowAllData
> > > > > ActiveWorkbook.Save
> > > > > End Sub
> > > > >
> > > > > The top row has the autofilter on.  If the data is not filtered then
> > > > > when the macro runs it throws a Run Time Error '1004'.  If it is
> > > > > filtered the Macro runs fine.
> > > > >
> > > > > I can't seems to find the right code to get the macro to end if it
> > > > > errors out.  I think it would be an if then statement but my coding
> > > > > skills aren't quite up the par.
> > > > >
> > > > > Any help would be great.  Thanks in advance.
> > > > >
> > > > > Jacob
> > > >
> > > > --
> > > >
> > > > Dave Peterson
> > 
> > -- 
> > 
> > Dave Peterson

0
appose (17)
6/1/2006 9:40:58 PM
It looks ok to me.

Jacob wrote:
> 
> Ok, I did some playing around and here is what I came up with you can
> tell me if it is right or not.  I hadn't a second macro for the close
> procedure so now I have two macros.
> 
> Private Sub Workbook_BeforeClose(Cancel As Boolean)
> Me.Saved = True
> End Sub
> 
> Private Sub Workbook_Open()
>   With Me.Worksheets("Current Revised")
>         .Select
>         .Range("a1").Select
>         If .FilterMode Then
>            .ShowAllData
>         End If
>     End With
> Me.Saved = True
> End Sub
> 
> This seems to work alright to me.  Let me know what you think.
> 
> Thanks,
> 
> Jacob
> 
> Jacob wrote:
> > Dave,
> >
> > The me.saved = true worked fine if I didn't try to filter anything.
> > Once I did it ask me to save. Any other ideas?
> >
> > Thanks,
> >
> > Jacob
> >
> >
> > Dave Peterson wrote:
> > > At the bottom of the workbook_open code, you can add a line that "lies" to
> > > excel.
> > >
> > > me.saved = true
> > >
> > > This tells excel to treat the workbook like it's just been saved/never updated.
> > >
> > >
> > >
> > > Jacob wrote:
> > > >
> > > > All of these solutions worked great. Thanks!!  I have thought about
> > > > putting the code when the workbook opens, but then I want to get around
> > > > not having to click the "Do you want to save Changes" when I go to
> > > > close out the workbook.  Is there a way to surpass the dialog box?  All
> > > > that the worksheet contain is like a contact list, plus I am the only
> > > > one currently using it.  If I were to share the workbook I guess I give
> > > > read only access to it.  Any suggestion???
> > > >
> > > > Thanks,
> > > >
> > > > Jacob
> > > >
> > > > Dave Peterson wrote:
> > > > > With ActiveSheet
> > > > >         If .FilterMode Then
> > > > >            .ShowAllData
> > > > >         End If
> > > > >     End With
> > > > >
> > > > > Will avoid the problem--as will:
> > > > >
> > > > >     on error resume next
> > > > >     activesheet.showalldata
> > > > >     on error goto 0
> > > > >
> > > > > And I think I'd be more specific than using Activesheet.  Maybe:
> > > > >
> > > > >     With me.worksheets("sheet9999")
> > > > >         .select
> > > > >         .range("a1").select
> > > > >         If .FilterMode Then
> > > > >            .ShowAllData
> > > > >         End If
> > > > >     End With
> > > > >
> > > > > just in case the wrong sheet was active.
> > > > >
> > > > > And I'd use:
> > > > > Me.Save
> > > > > instead of:
> > > > > ActiveWorkbook.Save
> > > > >
> > > > > Me refers to the thing holding the code--in this case, it's ThisWorkbook.
> > > > >
> > > > > ========
> > > > > But what happens if a user opens the workbook, messes it up beyond belief and
> > > > > wants to close without saving?
> > > > >
> > > > > Your code will save his/her changes and that may not be good.
> > > > >
> > > > > Have you thought of putting the equivalent code in the Workbook_open event so
> > > > > that things are set up when the workbook opens instead?
> > > > >
> > > > > Jacob wrote:
> > > > > >
> > > > > > I have a macro to run right before the workbook closes.  It is as
> > > > > > follows:
> > > > > >
> > > > > > Private Sub Workbook_BeforeClose(Cancel As Boolean)
> > > > > > Range("A1").Select
> > > > > > ActiveSheet.ShowAllData
> > > > > > ActiveWorkbook.Save
> > > > > > End Sub
> > > > > >
> > > > > > The top row has the autofilter on.  If the data is not filtered then
> > > > > > when the macro runs it throws a Run Time Error '1004'.  If it is
> > > > > > filtered the Macro runs fine.
> > > > > >
> > > > > > I can't seems to find the right code to get the macro to end if it
> > > > > > errors out.  I think it would be an if then statement but my coding
> > > > > > skills aren't quite up the par.
> > > > > >
> > > > > > Any help would be great.  Thanks in advance.
> > > > > >
> > > > > > Jacob
> > > > >
> > > > > --
> > > > >
> > > > > Dave Peterson
> > >
> > > --
> > >
> > > Dave Peterson

-- 

Dave Peterson
0
petersod (12004)
6/2/2006 12:53:35 AM
Reply:

Similar Artilces:

CRM 1.0 Crystal Print report error
Hi I am trying to use the builtin crystal reports and every report is coming back with the below error any advice on how to solved this? Regards J Error encountered by Crystal PageServer ---------------------------------------------------------------------------- ---- The error message returned is: Error detected by database DLL. [On Cache/Page Server: CRMSERVER.pageserver] You may need to restart your Crystal Services on your application server: You can accomplish this via the following stepsL 1. Click Start, point to Programs, point to Crystal Enterprise, and click Crystal Con...

Present Value of One Time Payment N Years in Future
How do you calculate the present value of a one time payment that is N years in the future? -- Will On Jun 10, 9:23 pm, "Will" <westes-...@noemail.nospam> wrote: > How do you calculate the present value of a one time payment that is N years > in the future? Suppose the future value is $100,000 in 20 years. You need to know the annual "rate" -- an interest rate, average growth rate, or a discount rate. Suppose it is 5%. Then the present value is: =pv(5%, 20, 0, -100000) I am a newbee to 2007 and have lost the function of saving a *.dbf file back to a...

Need only one DLL instance to run...
Hi all, 1: if two apps load the same DLL - LoadLibrary(...) - system will create to different instance of the DLL... Now, in my DLL i've a CList and i need it to be visible to all instance and all apps!!!! Is there a way!? 2: I need the dll to remain loaded till machine reboot!!! Is it possible!? Thanks Ale >if two apps load the same DLL - LoadLibrary(...) - system will create to >different instance of the DLL... >Now, in my DLL i've a CList and i need it to be visible to all instance and >all apps!!!! > >Is there a way!? It'll be difficult to share a ...

credentials to run this report are not stored
Hi all, I'm getting this problem when I try and create a timed subscription. Error: ...credentials to run this report are not stored..... ok I created another folder under the same folder where I'm having this problem. loaded the report and I have no problem. I even moved the current folder with that report in it. Creted another folder with the same name and still the same problem with that named folder. With a different name for the folder I have no problem??? I'm stuck here.. almost all post just talk about storing the credentials, Already done and works...

run time error 10-22-03
I am having a lot of trouble when I open up word I get run time error 52 in VB. I have tried uninstalling word and reinstalling it. WE have tried deleting the macro but still to no avail can someone help me please? ...

Repost: Error running Report in an Access 2003 db from Access 2007
Ok, clarification - ignore the code from my original post, some of the reports do work. The ones that don't are reports that I have being filtered. Here is the code from one of those buttons: Private Sub Ok_Click() On Error GoTo Ok_Click_Err 'using the customer sub form for customer state report to filter the report, clicking ok will open report for selected state Dim stDocName As String Dim stLinkCriteria As String If Not IsNull(Me.Search_Results) Then stLinkCriteria = "[StateOrProvince] = """ & Me![Search Results] & """"...

Payables Batch error
Hi All, While trying to run Payables Checks (In payables management) we got the following error message: Duplicate check numbers exist for checks in batch To resolve this error, we closed out of the windows so that we could try and recover our check batch, but the batch is not available in the batch recovery window. When we try to view the payables batch (Transactions->Purchasing->Batches), the batch status is stuck on "Check Processing" and when we select that batch, we get the following error message: This batch cannot be edited. Please check the batch status in Batch...

System Error when opening Excel 2007
A client is receiving this error "system Error &H80004005(-2147467259)" in excel 2007 when opening a new file or an exisiting file. This error came up after visio 2003 was uninstalled and visio 2007 got installed on his system. This error can be a lot, and I looked a bit around where they say it might be something with memory. But then I wonder why he never gave this error before untill visio 2007 got installed. Any help is welcome and I would be very thankfull to those who can help me in this issue. Greetz ...

Automatically run macro
My name is Mike and i have a question about microsoft excel macro's. Attached is a copy of the excel sheet im working on. Below the excel sheet is the macro I built. Some of the cells contain given values and some cells are calculated from formulas. Cell (G4) is my given value...it is related to cell (C32). The point is, I plug a value into cell (C10) and it runs through the rest of the calcs in the other cells and gives me a value to cell (C32). I built a macro that works as a goal seek pretty much. The macro makes cell (C32) equal to cell (G4) and gives me the value for cell (C10). I wan...

Excel Continuous Running Total
I posted a message earlier and have received a partial solution. I want to keep track of how much stock prices go up or down with a running total of how much they go up or down over several days until the direction changes. For example, if price go up 10 on Mon, 20 on Tues, 30 on Thurs and down 10 on Fri I want my running total column to show a positive number of 60 and then a red number of 10 and continue adding the amount of the total of the down days until the market shows an up day. The formula I am now using total the first and second day but does not do a running total count if t...

display changing label caption on form as sub runs w/o screen flic
let's say i have this routine Sub Test label1.caption = "Starting ... " 'do events label1.caption = "Getting there ... " 'do events label1.caption = "Finished! ... " End Sub on my form, i have label1 right in the middle what happens is sometimes the message will change, and then sometimes it wont, or it will show the first one, skip the second and jump to the third etc etc etc so it is inconsistent. is there a way to make sure the label caption displays consistently, on time, wh...

Preview
I am using Publisher 2007 with Windows 7 and everytime I try to preview the document, Publisher goes into "not responding" mode and resets the preview all over again and again and again.... Any ideas how to fix this? Is your video/graphics driver current? Take a look at the 4th FAQ here: http://ed.mvps.org/Static.aspx?=Publisher/FAQs Windows 7 may have the display properties placed differently. -- Mary Sauer http://msauer.mvps.org/ "Ulli" <Ulli@discussions.microsoft.com> wrote in message news:DEB7AA38-7A4F-4F36-842D-EB8CF67ABD01@microsoft.com... ...

A spreadsheet model to estimate waiting times?
Hi All I am trying to develop a simple model to estimate (predict) waiting times (medical context) based on the following input data: IR, input rate (i.e. number of requests for test x received per week). In other words, demand. OR, output rate (i.e. number of appointment slots available per week). In other words, capacity. The build-up of patients waiting (waiting list, WL) is fairly easy to calculate (I think!), so long as the IR and the OR remain constant: WL=(OR/(IR/OR)+WN), where WN is the week number that the test request is received, but the waiting time itself (in weeks) is trickier, ...

http://www.w3.org/2001/XMLSchema.xsd parsing error
Short: It seems that System.Xml.Schema.XmlSchema cannot handle the original http://www.w3.org/2001/XMLSchema.xsd. How do I workaround? Is there a "Microsoft compatible XML Schema schema" anywhere? The Long Story: I have an XML format that somewhere embeds an xs:schema <xs:element ref="xs:schema"/> to accomplish this, i have to add <xs:import namespace="http://www.w3.org/2001/XMLSchema"/> to my XSD and define a namespace prefix xs. System.Xml.Schema.XmlSchema fails to load my schema, because xs:element is not defined", so i changed this...

DoCmd.OpenReport error 2501
Hello. Using Access 2002 on Windows XP Pro, SP2 computer. When running the code at the end of this post, it blows up on the DoCmd.OpenReport with error 2501. I can't figure out why. I tried searching for that error with no luck. This problem only occurs on one computer. The same program works for everyone else on the LAN. It is being run from a network drive. Any help would be gratefully appreciated. Thanks, Tony If strWhere = " " Then DoCmd.OpenReport stDocName, acViewPreview Else DoCmd.OpenReport stDocName, acViewPreview, , strWhere End If Exit_Command2_Cli...

Sorry if this has been asked a 1000 times but
...how can I restore a corrupt .mbf file? The existing salvage utils appear to only work on .mny files. Many thanks! In microsoft.public.money, [ice] wrote: >..how can I restore a corrupt .mbf file? Corrupt in the sense that Money says it is corrupt? I don't see any hope. Corrupt in the sense that the OS cannot read the media correctly and gets CRC errors? There are data recovery services that might be able to help you. Sometimes a different drive on another computer can read that floppy that you machine won't. Write-protect that floppy now. Copy what you can from each of the ...

Synchronization errors #2
Outlook 2003 is not properly synchronizing offline files. I have gone throught the send/receive settings I have checked the cache mode. However, it will synch the files if you manually go through each folder right click and Prcess the Headers. Operating System for this machine is XP. Thanks in advance for any help and guidance If you delete the .ost and try again does it work? If you try a new mail profile, does that help? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my...

Excel Short of memory error
Where is the repair feature to try and fix this problem? Perhaps you could give us a few more details:- What OS What version Excel When does the error occur Is it specific to one file Does it happen to all files Does it happen with no files but when you start excel All of these things help us enormously, and the trick to getting a good answer is in asking a good question, else you end up dancing around with a dozen different options whilst we run through the book.. -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro /...

NTVDM error?
I just got a new Dell laptop, and installed ProSeries 2009 tax software. The program won't open and I get the error: "16 bit MS-DOS Subsystem. C:\ProWin09\32bit\PROSER~1.EXE The NTVDM CPU has encountered an illegal instruction." Can anyone help? Try this thread http://www.techspot.com/vb/all/windows/t-5039-NTVDM-CPU-illegal-instruction-.html "court475" <court475@discussions.microsoft.com> wrote in message news:1E4A8614-9C1C-4EE6-B26B-55C0A19827F9@microsoft.com... >I just got a new Dell laptop, and installed ProSeries 2009 tax sof...

Create a custom footer for all Excel worksheets at one time...
I want to create a custom footer, just once, that could be applied to all worksheets in an Excel workbook. Microsoft Word lets you do this, so why not Microsoft Excel? BigCat Try the code below: Be sure to substitute the information for what you want. HTH Dennis ******************************************** Sub PageSetupAllSheets() Dim EachSheet As Worksheet For Each EachSheet In ActiveWorkbook.Worksheets With EachSheet.PageSetup ' &F = File ' &A = Tab ' &D = Date ' &T = Time ' &P = Page ' &N = Pag...

Money 2002 will not run
I had been using Money 2002 for approx. 3 yrs on my home pc (Dell Dim 2100, XP Home Ed. w/SP2). Last year, it simply would not launch. No error message, no splash screen, no app opening, no process listed in Task Manager. Just.... nothing.... The only change that was made to the system since M2k2 last ran was upgrading my a/v solution from Trend Micro PC-Cillin to TM Internet Security. I have tried disabling every aspect of the Internet Security product, as well as completely un-installing the app, and then attempting to run Money, but the same thing (nothing) happens. I was considerin...

Word error prevents its use as Outlook editor
I have Outlook 2002 and Word 2002 from Office XP Professional. If I start with a freshly rebooted system, open Outlook, and try to reply or forward an email, it tries to open it in Word, but says that Word is busy or cannot be found. I can even shut down Word in the Task Manager and try it again, yet the same thing happens. Once I do this and shut down Outlook, Word continues to run in the background (on Task Manager or refusing to shut down). As long as i do not try to reply or forward a message, none of this occurs. what can i do to correct this??? I tried to repair and restore from with...

Error when deleting mail from outlook
I'm getting an error saying ERROR UNKNOWN when deleting mail from outlook. Please, Please Help KidoL ...

Custom time format
I would like to use a single format for a couple of situations. "12:00:55.99 AM" should return ":55.99" Currently I am using "\:ss.00" "12:01:55.99 AM should return "1:55.99" Currently I am using "[m]:ss.00" Is there a single format that I can use for both of these situations? Thanks, Horatio How about: [>0.000694444444444444][m]:ss.00;\:ss.00 0.000694444444444444 = 1/24/60 = 1 minute "Horatio J. Bilge" wrote: > > I would like to use a single format for a couple of situat...

Changing an axis to show time with hour intervals
I am trying to create a chart from a spreadsheet of data that has 3 years and all 12 months. Each month has different days and different times where data was pulled. What I want to do is create a chart with all the months in the data and have the axis showing time intervals of an hour each starting from 12:00am-12:00am with the hours in between 12:00am, 1:00am, etc). Can anyone help me? I have tried using the scale under the format axis tab but can't figure out how to show time in intervals. Thanks. If your combined date and time is in A2, use =MOD(A2,1) to get just the time, and ...