Consulting

Results 1 to 6 of 6

Thread: Excel 2013 erro 13 message

  1. #1
    VBAX Regular
    Joined
    Dec 2013
    Posts
    11
    Location

    Excel 2013 erro 13 message

    I have a real brain twister here....hope someone can shed some light on this.

    Workbook created in Excel 11 [office 2003]

    Has a sub form that communicates with a device. There's a button to start the device. It has worked in Win2k, Vista, WinXP, Win7, Win 8 up to now. It has worked in Office 2003, 2007, Xp, Office 2010. I have never come across this problem...

    When opened in Excel 2013, when the start button for the device runs it's code, Excel throws an error 13 type mismatch. I remoted inot the box and checked that all the libraries are loaded. Naturally it's loading Excel 2013 libraries where the version I send is using Excel 11 but the other 4 libraries are all matching.

    Visual Basic for Applications
    Microsoft Excel 11.0 Object Lib [his are for his version but should work]
    Ole Automation
    Microsoft Forms 2.0
    Microsoft DAO 3.6

    Now...this was working even on this computer but with a hickup on first opening the workbook that said "some objects not available". But the form would fire up the digital box and it worked.

    In an effort to get rid of that hickup I sent him a spreadsheet that was supposed to remove and MISSING references. I didn't want to give access to the VBA code.

    That workbook locked his Excel. After that, my workbook started this Error 13 problem.

    I installed software to allow me to view and run his computer. I checked the libraries. I checked his macro security to verify it has access to VBA projects, etc., etc. etc.

    I can find nothing in his configuration that is wrong. I had him send me the workbook and I opened it on my Win7 Excell 11 box....works perfectly.

    There can be no data mismatch as the error suggests that I can think of. On startup it's simply running code that fires the box up. I blows up every time on .dqsample which is a sample rate for the box.

    The box comes with it's own native software and works fine under that.

    I verified comm port settings and sample rate are correct.

    Does anyone have any ideas????

    This is win 8 with office 2013. It will a cold day in you know where before i ever switch to win 8.... Guess I'm old...

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Can you post the workbook so that we can try it?

    BTW, I quite like Win 8. Admittedly, I have not tried any esoteric stuff on it, but I have had no problems. Now, Excel 2013 on the other hand, the washed-out colouring is very bad, the all-caps ribbon is hideous, the animations make me want to kick the machine out of the window, and it is sloooooooooooooooow as that place you mention freezing over.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Dec 2013
    Posts
    11
    Location
    Agreed on Office 2013 interface...total P.O.S. IMO but everything is about bells and whistles these days...

    Regarding error 13, it might be resolved but I'm thinking not. I will report back on that as soon as I know. I used teamviewer 9 to view the box in Finland, unlock the VBE and run the troubled code. I was able to work around the problem line and get him up and running. BTW...teamviewer seems to be a very handy tool and easy to use. I figure it out much faster than I did his Windows 8 desktop or the Excell 2013 ribbon

    First, does a text box on a user form care at all if the data it receives is text vs number?
    I looked at all the property settings and can't find anything regarding that in the properties of the text box.

    What would be helpful to me is as follows.

    I need to run a query against an access back end database when Error 13 rears it's ugly head. It would be a query against a single table to search for and identify and field that is empty. I need it to display the field name that is empty. Some fields are numbers and a few are text.

    I can build it with the query builder and dump the results to a cell or the query builder. I want to simplify that process for end users. I thought about building the query and putting a command button on the worksheet or form to run it BUT I can't be assured that the query builder tool will be installed on every box nor assured it will operate the same throughout the various flavors of Office.

    So, my best bet is a command button that runs VBA code to do the job....

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by larrycav View Post
    Regarding error 13, it might be resolved but I'm thinking not. I will report back on that as soon as I know. I used teamviewer 9 to view the box in Finland, unlock the VBE and run the troubled code. I was able to work around the problem line and get him up and running. BTW...teamviewer seems to be a very handy tool and easy to use. I figure it out much faster than I did his Windows 8 desktop or the Excell 2013 ribbon
    I agree. I used to use TightVNC and the like, and when I first cam across TV I was knocked out, such a major improvement.

    Quote Originally Posted by larrycav View Post
    First, does a text box on a user form care at all if the data it receives is text vs number?
    I looked at all the property settings and can't find anything regarding that in the properties of the text box.
    It takes text, characters are text, numbers are text and need to be converted to numeric to do math on them.

    Quote Originally Posted by larrycav View Post
    What would be helpful to me is as follows.

    I need to run a query against an access back end database when Error 13 rears it's ugly head. It would be a query against a single table to search for and identify and field that is empty. I need it to display the field name that is empty. Some fields are numbers and a few are text.

    I can build it with the query builder and dump the results to a cell or the query builder. I want to simplify that process for end users. I thought about building the query and putting a command button on the worksheet or form to run it BUT I can't be assured that the query builder tool will be installed on every box nor assured it will operate the same throughout the various flavors of Office.

    So, my best bet is a command button that runs VBA code to do the job....
    Why bother with a button, why not just issue the query via ADO when error 13 arises?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Regular
    Joined
    Dec 2013
    Posts
    11
    Location
    Thank you for that information re the text box. BTW I sent TV a very nice email about their app. They sent me a link for an even newer version. Going to try that soon. I use to use WinVNC many years ago but this is way better.

    I've been thinking a query on the startup, but I don't know the syntax to query the table as in the following code I'm using for updates. This is some of the code I use to update fields in the .mdb table via text boxes and command buttons. I searched for some examples on how to query the table using this simple type of code to check for null values but I can't find anything. I live by K.I.S.S.

    Perhaps you can help me with this. Here's the code sample for table updates when values need changing from the Excel Front End app. I like this type of code because it doesn't see to require a long communication string like all the VBA code samples I've found. I already built in a method to prevent my app from dumping empty values to the table but there's a reason I won't get into why I need this.

    It would replace what I have put in Italics.

    Private Sub CmdTempChange_Click()
    If TextTempChange.Value = "" Then
    MsgBox "You must enter a temperature value"
    Exit Sub
    Else
    DataqSdk1.Stop
    Set ws = DBEngine.Workspaces(0)
    Set db = ws.OpenDatabase("C:\path dbname.mdb")
    Set rs = db.OpenRecordset("tablename")
    temp = rs.Fields(19)
    rs.Edit
    rs!AirTemp = TextTempChange.Text
    rs.Update
    Call Config
    Call Start
    End If
    End Sub
    Either a command button that can be clicked to run the query to check for null or "" values. If found, via message box, display the table field with the field name that has the missing value. The back end db requires values in all the fields. If one is missing it will throw an error 13. I could put that code at the beginning of the code that fires up the device, thus putting an initial check in place at the very beginning of the process.
    Last edited by Bob Phillips; 12-15-2013 at 11:36 AM. Reason: Remove visible italic markups

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You would need to supply the SQL yourself, but it could be something like this to populate an array

    Dim conn As Object
    Dim RS As Object
    Dim SQL As String
    Dim connString As String
    
        Set conn = CreateObject("ADODB.Connection")
        connString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
                     "Data Source=C:\MyDatabase.accdb"
        SQL = "..."
        conn.Open connString
        Set RS = conn.Execute(SQL)
        dataArray = RS.Getrows()
        RS.Close
        Set RS = Nothing
        conn.Close
        Set conn = Nothing
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •