macro to continue running if error

Hi,

I have the following macro that is working fine. It is looking at a
specified worksheet array and executing the macro "Filter" on each
worksheets. However, in case one of the worksheet is not existing, I
would like the macro to pass the non existing worksheet and continue
running on the next available worksheet. I tried adding the following
statement: "On Error Resume Next" at the beginning but it is passing
everything.

Any help would be appreciated.
Thanks

Sub UpdateAll()
    For Each sh In Worksheets(Array("1", "2", "3", "4", "5", "6", "7",
"10", "11", "12", "21", "22", _
    "23", "24", "25", "26", "27", "28", "29", "30", "31", "41", "42",
"43", "44", "45", "46", _
    "47", "48", "49", "50", "51", "52", "53", "54", "55", "61"))
    sh.Select
    Call Filter
    Next sh
End Sub
0
Norvascom
2/28/2010 8:10:41 PM
excel.programming 6508 articles. 2 followers. Follow

6 Replies
1024 Views

Similar Articles

[PageSpeed] 53

I'd try...

Option Explicit
Sub UpdateAll()
    Dim iCtr As Long
    Dim myArr As Variant
    Dim TestWks As Worksheet
    
    myArr = Array("1", "2", "3", "4", "5", "6", "7", _
                    "10", "11", "12", "21", "22", _
                    "23", "24", "25", "26", "27", _
                    "28", "29", "30", "31", "41", "42", _
                    "43", "44", "45", "46", _
                    "47", "48", "49", "50", "51", "52", _
                    "53", "54", "55", "61")
    
    For iCtr = LBound(myArr) To UBound(myArr)
        Set TestWks = Nothing
        On Error Resume Next
        Set TestWks = Worksheets(myArr(iCtr))
        On Error GoTo 0
        
        If TestWks Is Nothing Then
            'not found!
        Else
            TestWks.Select
            Call macFilter
        End If
    Next iCtr
    
End Sub

I wouldn't use Filter as the name of a procedure.  If you search VBA's help,
you'll see that it's used by excel.

Norvascom wrote:
> 
> Hi,
> 
> I have the following macro that is working fine. It is looking at a
> specified worksheet array and executing the macro "Filter" on each
> worksheets. However, in case one of the worksheet is not existing, I
> would like the macro to pass the non existing worksheet and continue
> running on the next available worksheet. I tried adding the following
> statement: "On Error Resume Next" at the beginning but it is passing
> everything.
> 
> Any help would be appreciated.
> Thanks
> 
> Sub UpdateAll()
>     For Each sh In Worksheets(Array("1", "2", "3", "4", "5", "6", "7",
> "10", "11", "12", "21", "22", _
>     "23", "24", "25", "26", "27", "28", "29", "30", "31", "41", "42",
> "43", "44", "45", "46", _
>     "47", "48", "49", "50", "51", "52", "53", "54", "55", "61"))
>     sh.Select
>     Call Filter
>     Next sh
> End Sub

-- 

Dave Peterson
0
Dave
2/28/2010 9:04:15 PM
Hi,

Not very elegant but it works. Look out for the line wrap on the string of 
sheet names


Public sh As Worksheet
Sub UpdateAll()
S = 
"1,2,3,4,5,6,7,10,11,12,21,22,23,24,25,26,27,28,29,30,31,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,61"
V = Split(S, ",")
For Each sh In ActiveWorkbook.Worksheets
    If Not IsError(Application.Match(sh.Name, V, 0)) Then
     Call filter
    End If
Next
End Sub

Sub filter()
MsgBox "Filter " & sh.Name
End Sub
-- 
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that 
introduces the fewest assumptions while still sufficiently answering the 
question.


"Norvascom" wrote:

> Hi,
> 
> I have the following macro that is working fine. It is looking at a
> specified worksheet array and executing the macro "Filter" on each
> worksheets. However, in case one of the worksheet is not existing, I
> would like the macro to pass the non existing worksheet and continue
> running on the next available worksheet. I tried adding the following
> statement: "On Error Resume Next" at the beginning but it is passing
> everything.
> 
> Any help would be appreciated.
> Thanks
> 
> Sub UpdateAll()
>     For Each sh In Worksheets(Array("1", "2", "3", "4", "5", "6", "7",
> "10", "11", "12", "21", "22", _
>     "23", "24", "25", "26", "27", "28", "29", "30", "31", "41", "42",
> "43", "44", "45", "46", _
>     "47", "48", "49", "50", "51", "52", "53", "54", "55", "61"))
>     sh.Select
>     Call Filter
>     Next sh
> End Sub
> .
> 
0
Utf
2/28/2010 9:42:01 PM
I am assuming that the numbers are the actual sheet names and not the sheet 
index number. If my assumption is correct then try the code below and there 
will be no error.

Using Select Case, even though there is only one case, multiple names can be 
used separated by a comma and in effect they become Or operators.

The reason for the error in your code is that if the sheet does not exist, 
you cannot use it in the array in the For Each statement.

Sub UpdateAll()
Dim sh As Worksheet
    For Each sh In Worksheets

      Select Case sh.Name
      
        Case "1", "2", "3", "4", "5", _
          "6", "7", "10", "11", "12", _
          "21", "22", "23", "24", "25", _
          "26", "27", "28", "29", "30", _
          "31", "41", "42", "43", "44", _
          "45", "46", "47", "48", "49", _
          "50", "51", "52", "53", "54", _
          "55", "61"
        
      End Select
      
      sh.Select
      
      Call Filter
      
    Next sh
End Sub

-- 
Regards,

OssieMac


0
Utf
2/28/2010 9:46:01 PM
My apologies. An error in the code I posted. It will work better if the 
Select and Call are included within the Case instead of outside of it. Also 
noted Dave's comment re Filter

Sub UpdateAll()
Dim sh As Worksheet
    For Each sh In Worksheets

      Select Case sh.Name
      
        Case "1", "2", "3", "4", "5", _
          "6", "7", "10", "11", "12", _
          "21", "22", "23", "24", "25", _
          "26", "27", "28", "29", "30", _
          "31", "41", "42", "43", "44", _
          "45", "46", "47", "48", "49", _
          "50", "51", "52", "53", "54", _
          "55", "61"
      
          sh.Select
      
          Call macFilter
          
      End Select
      
      
    Next sh
End Sub

-- 
Regards,

OssieMac


"OssieMac" wrote:

> I am assuming that the numbers are the actual sheet names and not the sheet 
> index number. If my assumption is correct then try the code below and there 
> will be no error.
> 
> Using Select Case, even though there is only one case, multiple names can be 
> used separated by a comma and in effect they become Or operators.
> 
> The reason for the error in your code is that if the sheet does not exist, 
> you cannot use it in the array in the For Each statement.
> 
> Sub UpdateAll()
> Dim sh As Worksheet
>     For Each sh In Worksheets
> 
>       Select Case sh.Name
>       
>         Case "1", "2", "3", "4", "5", _
>           "6", "7", "10", "11", "12", _
>           "21", "22", "23", "24", "25", _
>           "26", "27", "28", "29", "30", _
>           "31", "41", "42", "43", "44", _
>           "45", "46", "47", "48", "49", _
>           "50", "51", "52", "53", "54", _
>           "55", "61"
>         
>       End Select
>       
>       sh.Select
>       
>       Call Filter
>       
>     Next sh
> End Sub
> 
> -- 
> Regards,
> 
> OssieMac
> 
> 
0
Utf
2/28/2010 10:01:01 PM
On Feb 28, 5:01=A0pm, OssieMac <Ossie...@discussions.microsoft.com>
wrote:
> My apologies. An error in the code I posted. It will work better if the
> Select and Call are included within the Case instead of outside of it. Al=
so
> noted Dave's comment re Filter
>
> Sub UpdateAll()
> Dim sh As Worksheet
> =A0 =A0 For Each sh In Worksheets
>
> =A0 =A0 =A0 Select Case sh.Name
>
> =A0 =A0 =A0 =A0 Case "1", "2", "3", "4", "5", _
> =A0 =A0 =A0 =A0 =A0 "6", "7", "10", "11", "12", _
> =A0 =A0 =A0 =A0 =A0 "21", "22", "23", "24", "25", _
> =A0 =A0 =A0 =A0 =A0 "26", "27", "28", "29", "30", _
> =A0 =A0 =A0 =A0 =A0 "31", "41", "42", "43", "44", _
> =A0 =A0 =A0 =A0 =A0 "45", "46", "47", "48", "49", _
> =A0 =A0 =A0 =A0 =A0 "50", "51", "52", "53", "54", _
> =A0 =A0 =A0 =A0 =A0 "55", "61"
>
> =A0 =A0 =A0 =A0 =A0 sh.Select
>
> =A0 =A0 =A0 =A0 =A0 Call macFilter
>
> =A0 =A0 =A0 End Select
>
> =A0 =A0 Next sh
> End Sub
>
> --
> Regards,
>
> OssieMac
>
>
>
> "OssieMac" wrote:
> > I am assuming that the numbers are the actual sheet names and not the s=
heet
> > index number. If my assumption is correct then try the code below and t=
here
> > will be no error.
>
> > Using Select Case, even though there is only one case, multiple names c=
an be
> > used separated by a comma and in effect they become Or operators.
>
> > The reason for the error in your code is that if the sheet does not exi=
st,
> > you cannot use it in the array in the For Each statement.
>
> > Sub UpdateAll()
> > Dim sh As Worksheet
> > =A0 =A0 For Each sh In Worksheets
>
> > =A0 =A0 =A0 Select Case sh.Name
>
> > =A0 =A0 =A0 =A0 Case "1", "2", "3", "4", "5", _
> > =A0 =A0 =A0 =A0 =A0 "6", "7", "10", "11", "12", _
> > =A0 =A0 =A0 =A0 =A0 "21", "22", "23", "24", "25", _
> > =A0 =A0 =A0 =A0 =A0 "26", "27", "28", "29", "30", _
> > =A0 =A0 =A0 =A0 =A0 "31", "41", "42", "43", "44", _
> > =A0 =A0 =A0 =A0 =A0 "45", "46", "47", "48", "49", _
> > =A0 =A0 =A0 =A0 =A0 "50", "51", "52", "53", "54", _
> > =A0 =A0 =A0 =A0 =A0 "55", "61"
>
> > =A0 =A0 =A0 End Select
>
> > =A0 =A0 =A0 sh.Select
>
> > =A0 =A0 =A0 Call Filter
>
> > =A0 =A0 Next sh
> > End Sub
>
> > --
> > Regards,
>
> > OssieMac- Hide quoted text -
>
> - Show quoted text -


Thanks OssieMac
0
Norvascom
3/1/2010 1:42:45 AM
Hi.  You would have to add a little more logic to this, but here's an 
additional general idea:

     Select Case Val(sh.Name)

     Case 1 To 7, 10 To 12, 21 To 31 'etc
         'Do Something
     Case Else
         'Do Nothing
     End Select

= = = = = = =
HTH  :>)
Dana DeLouis

On 2/28/2010 8:42 PM, Norvascom wrote:
> On Feb 28, 5:01 pm, OssieMac<Ossie...@discussions.microsoft.com>
> wrote:
>> My apologies. An error in the code I posted. It will work better if the
>> Select and Call are included within the Case instead of outside of it. Also
>> noted Dave's comment re Filter
>>
>> Sub UpdateAll()
>> Dim sh As Worksheet
>>      For Each sh In Worksheets
>>
>>        Select Case sh.Name
>>
>>          Case "1", "2", "3", "4", "5", _
>>            "6", "7", "10", "11", "12", _
>>            "21", "22", "23", "24", "25", _
>>            "26", "27", "28", "29", "30", _
>>            "31", "41", "42", "43", "44", _
>>            "45", "46", "47", "48", "49", _
>>            "50", "51", "52", "53", "54", _
>>            "55", "61"
>>
>>            sh.Select
>>
>>            Call macFilter
>>
>>        End Select
>>
>>      Next sh
>> End Sub
>>
>> --
>> Regards,
>>
>> OssieMac
>>
>>
>>
>> "OssieMac" wrote:
>>> I am assuming that the numbers are the actual sheet names and not the sheet
>>> index number. If my assumption is correct then try the code below and there
>>> will be no error.
>>
>>> Using Select Case, even though there is only one case, multiple names can be
>>> used separated by a comma and in effect they become Or operators.
>>
>>> The reason for the error in your code is that if the sheet does not exist,
>>> you cannot use it in the array in the For Each statement.
>>
>>> Sub UpdateAll()
>>> Dim sh As Worksheet
>>>      For Each sh In Worksheets
>>
>>>        Select Case sh.Name
>>
>>>          Case "1", "2", "3", "4", "5", _
>>>            "6", "7", "10", "11", "12", _
>>>            "21", "22", "23", "24", "25", _
>>>            "26", "27", "28", "29", "30", _
>>>            "31", "41", "42", "43", "44", _
>>>            "45", "46", "47", "48", "49", _
>>>            "50", "51", "52", "53", "54", _
>>>            "55", "61"
>>
>>>        End Select
>>
>>>        sh.Select
>>
>>>        Call Filter
>>
>>>      Next sh
>>> End Sub
>>
>>> --
>>> Regards,
>>
>>> OssieMac- Hide quoted text -
>>
>> - Show quoted text -
>
>
> Thanks OssieMac



0
Dana
3/1/2010 2:16:15 AM
Reply:

Similar Artilces:

count text through worksheets generates error
Hi all, In a workbook with a lot of worksheets i want to count the number of times a specific text value occurs in a cell. All sheets have the same layout. So, for instance, when i want to count the number of times the value "yes" occurs in cell B2 through sheets 1 to 5 and i use the function =countif(sheet1:sheet5!b2,"yes") excel generates an error message (#value!). I don't understand why, because if i would use the function in 1 sheet only I get the required result. I suspect that some functions cannot work on grouped sheets. Is there a list somewhere that e...

DPM connection error
Hi, I just applied SP1 to my DPM 2007 server. Everything seemed good to go until I started to update the client agents. After about 10 minutes the DPM server became very unresponsive. I rebooted it and now when I try to connect to the Admin console I get an error 'Unable to cnnect to dpm.domain.com (ID: 948) Verify that the DPM service is running on this computer". I have gone through all of the services and set them to start automatically and rebooted once more and I still receive the error. Any help would be awesome. Thanks! Check the status of the DPM servic...

Can someone help with this error
I am randomly getting an access error in my application and I am trying to find it. The error seems to occur when allocating a buffer in the CString code. Does anyone know if the dump below is pointing to anything specific? It seems like the error is occuring when 'text' is be allocated but I don't know why. // this is the function call in the ArchExists(..) module where the CString is allocated (parm1). CComSetup::ExtractParams( text, &type1, &desc1, &name1, &id1 ); // This is the declaration of the function void CComSetup::ExtractParams( CString src, CStrin...

Outlook 2000 memory error
Hi, When I deleted an item in Calendar, I got error message that "There is not enough memory available to perform the operation." I am using Outlook 2000. Thanks in advance. Grace ...

need help... Getting a error when I add a xml schema include location xsd file
Hi, I am trying to add the following line to my xml schema xsd file <xsd:include schemaLocation="../../../Common/datatypes.xsd"/> Here is my code XmlSchemaInclude include = new XmlSchemaInclude(); include.SchemaLocation = "../../../Common/datatypes.xsd"; schema.Items.Add(include); when I print out the schema, it crashes StreamWriter sw = new StreamWriter(@strFormName+".xsd", false, Encoding.UTF8); schema.Write(sw); sw.Close(); Any help is greatly appreciated, Thanks ...

Hyperlink Macro / Hide Tabs
Hi I have an Excel 2007 worksheet with 10 tabs. The first tab has a contents section where each of the subsequent tabs is hyperlinked. By clicking on the hyperlink I go to cell A1 of whichever tab I select. In addition each tab has a hyperlink taking me to the contents tab. I would like a macro where, when I click on a hyperlink, all tabs other than the cover tab and the selected tab are hidden. In addition when I click on the contents tab in a selected tab every tab is hidden bar the contents tab. Can anybody help? Rup ...

Global error handler
Is there, in ACCCESS 2007, and/or VB a global error handler? I've checked the docs but not sure on the feasibility of this. I've seen On Error and OnError, and a discussion excepotion handling, but again, I'm not sure on the implementation of error and exception handling. -- The personal opinion of Gary G. Little You must add the error handling to each routine. There's not a way to just make it automatically go to an exception handler without doing so. In each routine, you can call a generic error handler. Here's an example of how: Error Handling in VBA at: ...

error with the form when using asp.
I get this error, when i submit the form. The error comes up and some technical advisor from my host company told me to change it to ASP Email but i don't understand what he was talking about. Can someone provide assistance. Server object error 'ASP 0178 : 80070005' Server.CreateObject Access Error /WebAppSub.asp, line 9 The call to Server.CreateObject failed while checking permissions. Access is denied to this object. ...

GP Client install errors
I installed GP 8.0 from a installation template on 1 XP machine with no problems. I have the ODBC properly setup, and bcp.exe properly installed to satisfy GP Utilities. I am able to log in with different users, no problem. I did the same thing on two other XP machines and both machines give this Dexterity Runtime error on start-up. Unable to open dictionary :C:PROGRA~1/MID1AC~1/GREATP~1/dictionary name.DIC. I get this error for the following .dic's: ADVSECURE.DIC ADV_FRM.DIC ADV_RPT.DIC AREC.DIC ARECFRM.DIC ARECRPT.DIC CFM.DIC CFMFORM.DIC CMFRPTS.DIC EXP1493.DIC EXP1493F.DIC EXP1493R....

return a zero for error
I'm having a problem with a spreadsheet I'm developing which records average marks of groups of students over several weeks. I want to display a "Running Average" of those averages as I enter the data, however, because I do this week by week there are inevitably weeks which have not had any data entered and her I see the error #DIV/0! for the formula =AVERAGE(IF(R5:R20<>0, R5:R20,"")). I do understand why I'm getting this (because I'm dividing by zero) but would like to return a zero so that the average of the averages will return a number rather tha...

Money Investment Toolbar Error
All of a sudden, whenever I try to access my portfolios in the Deluxe version, I get this error: AppName: iexplore.exe, AppVer: 6.0.52800.1106, ModName: myisam05.dll, ModVer: 4.0.3107.50512, Offset: 00006e27. I can remove the Toolbar and use the basic portfolio version but continue to get the above error and an IE restart whenever I try to upgrade to Deluxe. Any suggestions> In microsoft.public.money, Dencoden wrote: >All of a sudden, whenever I try to access my portfolios in the Deluxe >version, I get this error: AppName: iexplore.exe, AppVer: 6.0.52800.1106, >ModName...

Macro Run on WorkBook Open?
Have a macro that I want to run when the file is first opened. Is this possible? If so, How? Thanks in advance -- / Sean the Mc / "I have not failed. I've just found 10,000 ways that won't work." - Thomas Alva Edison (1847-1931) You answered your own question. Right click on the excel icon just to the left of FILE> the workbook_open event is there. -- Don Guillett SalesAid Software donaldb@281.com "What-a-Tool" <Die!FrigginSpammersDieDie!@IHateSpam.Net> wrote in message news:MetMc.7592$BX.2445@lakeread08... > Have a macro that I want to run w...

creating a macro that will paste a value and then move
Please, help! I am trying to recreate a macro that opens a workbook, goes to Sheet 1, pastes clipboard info into A1, then moves to B1, then saves and closes the file. I know how to make the file automatic and how to get it to open and close (Auto_Open), but I cannot remember how to get the macro to move from cell to cell (left-to right). What happens is that when I do a recorded macro and then try to rerun it; it will paste into A1 and then will tab over to B1. Then upon the next time that I call up the spreadsheet, it will even paste to B1, but will not move further from that spot. I then...

Only run if check box is checked
I have some code that I only want to be run if a check box is checked. So I inserted an ActiveX check box which I have named cbRecord. I then put the following IF around the code which is initiated by clicking a spinner form control: If cbRecord.Value Then .... .... .... End If However, when the code is run I get the following error: Run time error '424': Object required. When I go to debug, the code doesn't even know that my check box exists. TIA...Geoff Try If Sheets("Sheet1").CheckBoxes("Check Box 1").Value = xlOn Then '...

Where are macros stored?
Specifically, where are Macros stored? Is it in my C drive?I've created some Macros, chosen them to be stored in Personal macro workbook instead of the other choices, and they are now arbitrarily stored in Personal.xls. Is Macros are stored in workbooks. The next question is "where are workbooks stored?" If you record a macro, you're given the option of what workbook to record into. If you choose personal.xls, they'll go there. If you choose, thisworkbook or new workbook, they'll go there. (I always record a macro into a test workbook. Then I can tweak ...

Authentication Error 04-28-06
One of our users is suddenly getting Aucthentication Error. "Microsfot CRM could not log you on to the system. Make sure your user record is eanbled and that you have been assigned at least one security role" I have checked the user in CRM, enabled and also has a role assigned. Checked the SQL databases which has relevant records. Checked the Deployment manager. So everything is normal as expected but for some reason the message started today. The other users are fine. This use has been working in CRM up until today. Thanks Nilesh ...

Explorer.EXE
When I switch on my computer, the following message widnow showup. I can not do anything, except to the the task manager. I try to restart the computer and the problem is gone. ===================================================== Explorer.EXE - Application Error The application failed to initialize properly (0xc0000142). Click on ok to terminate the application. ===================================================== The problem occur very frequently and I can only solve it by restart the computer. Sometimes I need to restart several time. Is anything wrong in my compu...

Compile error in Excel 2002
I have Excel 2002 installed on a Windows 7 machine. While this version of Excel was installed on Win XP, it worked fine. However, since I installed it on Win 7, every time I open or close an Excel file, I'm getting an MS Visual Basic compile error in hidden module. On opening a file, it is AutoExecNew module, on exit - DistMon. I followed advice in the MS KB Article ID: 307410 and removed both pdfmaker.dot and pdfmaker.xla. But it did not help. The error message pops up again... Is there any other solution to this problem? -- Ilya Zeldes Fort Myers, Florida Most ...

Can I force confirmation prompt on close? Or tell Outlook to run in background?
I am constantly accidentally pressing the close button instead of "minimize" when I am at work. I press close explicitly but I would like behavior like antivirus or IM clients. I want Outlook to continue to run in the background, so it can continue to check for email, alarms, etc. Is there either a way to force confirmation of closure, or to have an outlook background task set up which doesn't close so easily? Rufus Rufus V. Smith <nospam@nospam.com> wrote: > I am constantly accidentally pressing the close > button instead of "minimize" when I am at ...

OWA 2007 HTTP 403 ERROR
Hello All, I’ve been able to successfully get up and running in a virtual environment (yes, yes I know it isn’t supported…but it’s a pseudo lab environment) exchange 2007. Up until two days ago the setup has been running very well allowing me to access my mail via OWA, as well as with the “Outlook Anywhere” components . The problem was that I couldn’t access my mail using the “Anywhere” components. In investigating this I found that the following events were logged. W3SVC Event ID 1039 and W3SVC Event ID 1002 , it appears as though I resolved both issues by running the command outlin...

Catastrophic Error in XL 2003
I've written some pretty standard, but complicated, VBA code under XL2000. A user with XL2003 gets a "catastrophic error" when opening the file (macros enabled), which sends him to the VBA debugger - but in a loop. Need Task Mgr to quit the application. This is NOT a shared workbook - I read those posts but haven't found a clue as to what could be causing this. I also got this error on an XL2003 machine (same description as above). After 'resolving' it by saving as an older version of Excel (even though it originally was XL2000!), I started getting "Out of m...

Assign Macro to Icon on toolbar
I want to assign a macro (error message) to the SAVE icon on the Standard Toolbar to disable that save function to get the user to use the save button I have set up on the Sheet. I know it can be done because I have it on a spreadsheet someone elsse set up but I cannot find where they set it up. THANKS for any help. In EXCEL 2007 take the following actions:- Office Button (top left hand corner). Excel Options Customize In:- Choose commands from: - select Macros Highlight the Macro you wish to attach to the Save button Add>> Your Macro should n...

IE script error in Outlook today
I've been recently getting an IE script error: Line: 325 Char: 1 Error: access denied Code: 0 Url: Outlook today Happens 2-3 times a week, in and out of outlook today page several times a day. Outlook 2003, latest version of IE and patched. Ran repair of office, reinstalled IE. Anything else? Hi Mark, RESOLUTION To Repair Outlook 2000 To run the Detect and Repair feature in your Office programs, follow these steps: 1.) Start an Office 2003 program. 2.) On the Help menu, click Detect and Repair. 3.) In the Detect and Repair dialog box, do any of the following: -Click to select th...

SOP_Document_TEMP has an incorrect record Length error
In Great Plains 8.0 Our Sales Transaction Entry, Print Invoice option throws an error occasionaly that I haven't been able to track down. The error is: 'An open operation on table 'SOP_Document_TEMP' has an incorrect record length'. If they repeate the invoice print option it works fine after 2 or 3 trys. My Sales Transaction Entry form and the Invoice are modified. I'm not able to repeate the error so it's difficult to track down. Any suggestions? Thanks Kevin R. Kevin The SOP_Document_TEMP table is a ctree temporary table which is created in the l...

Run time error 2465
I'm trying to open an access db and upon loading or opening I get Run Time Error 2465 Can not find field 'cmdLock' referred to in your expression. When I go to Debug I see it highlight the line in question: frm!cmdLock.Caption = IIf(bLock, "Un&lock", "&Lock") It seems OK, what am I missing? One other strange thing, (well strange to me) is that this db is located on a network drive. No one else has this problem, but me? Any ideas? Hi Rock, When an application works on other PCs, but fails on one PC, this is usually a sign of a MISSING reference...