Solved

Variable uses and automation type not supported in visual basic

Posted on 2015-02-12
8
76 Views
Last Modified: 2015-02-16
I am trying to write records to a vb list box and one field is of the "time" variable type.  I get the error message indicated in the post title even when I try to write it as CStr(value).  Any ideas?
0
Comment
Question by:Bob Schneider
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40607043
Can you post your workbook?
0
 

Author Comment

by:Bob Schneider
ID: 40607080
Here is my code:
    Set rs = New ADODB.Recordset
    sql = "SELECT Bib, Chip, Time, Reader, Antenna FROM RawRFID WHERE EventID = " & lEventID
    rs.Open sql, conn, 1, 2
    If rs.RecordCount > 0 Then
        RawReads = rs.GetRows()
    Else
        ReDim RawReads(4, 0)
    End If
    rs.Close
    Set rs = Nothing
    
    For i = 0 To UBound(RawReads, 2)
        lstRawData.AddItem i + 1 & vbTab & RawReads(0, i) & vbTab & RawReads(1, i) & vbTab & RawReads(2, i) & vbTab & RawReads(3, i) & vbTab & RawReads(4, i)
    Next i

Open in new window

0
 
LVL 47

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40607108
Does it work if you don't try to add that field?

Why are you using a listbox with "coulmms" created with tabs rather than a listview or some type of grid?
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 47

Assisted Solution

by:Martin Liss
Martin Liss earned 500 total points
ID: 40607121
In Access could you convert the problem field to some other type before you try to add the data to the listbox?
0
 

Author Comment

by:Bob Schneider
ID: 40607828
The problem is that, as I write it to the array, I can't transfer it to the list box even if I convert it to a string.  I think I will just change the data type.  I don't think it needs to be Time necessarily.  I will leave this open in the event someone has a better solution.
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40608034
I think I will just change the data type.
That's what I was suggesting in my previous post.
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40612211
I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
0
 

Author Comment

by:Bob Schneider
ID: 40612256
I will look at that.  Thanks so much!!!
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question