Results 1 to 3 of 3

variable or with block variable not set

Threaded View

  1. #1
    Registered User
    Join Date
    06-04-2008
    Posts
    14

    variable or with block variable not set

    Hi all,

    I'm having two problems with a program that I'm writing and I'm wondering if you could help me out:

    1) In the following code, I have a collection of "Group" objects stored in "groups". I want to make a temp Group object to store an item from the collection. However, on the 2nd line below I keep getting: "Object variable or with block variable not set".

       
    
    Dim currentGroup As Group
    currentGroup = groups.Item(counter2)
    2) I'm trying to retrieve an item from a variant array and convert it to an int using CInt, however on the fifth line below I get the error: "Type Mismatch"

    
    Dim currentBit As Integer
    Dim lineBits As Variant
    Line Input #filePathNumber, lineString
    lineBits = Split(lineString, ",")
    currentBit = CInt(lineBits(bitCount))
    Any help would be appreciated thanks.

    KiSS
    Last edited by VBA Noob; 10-15-2008 at 04:16 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Error 91 - Object variable or with block variable not set
    By jaiswati in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 10-10-2012, 11:44 AM
  2. Error 91:“Object Variable or With Block Variable not set”.
    By Mbrolass in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2007, 08:44 AM
  3. Error: "Object Variable or With Block variable not set"
    By aziraphale in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-03-2007, 06:14 PM
  4. Object Variable or with Block Variable not set Error
    By Jen_DPS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-13-2006, 03:15 PM
  5. Error 91, Object Variable or With Block variable not set.
    By AMK4 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2006, 11:38 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1