+ Reply to Thread
Results 1 to 2 of 2

Runtime Error 91 - object variable or with block variable not set

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    2

    Runtime Error 91 - object variable or with block variable not set

    run time error 91 - when i go to debug this is what shows up

    Sub LoopThroughFiles()
    Dim MyObj As Object, MySource As Object, file As Variant
    Set MySource = MyObj.GetFolder("C:\Users\rsa")
    For Each file In MySource.Files
    Selection.EntireRow.Insert
    ActiveCell.FormulaR1C1 = "Title"
    Range("B1").Select
    ActiveCell.FormulaR1C1 = "title"
    Range("C1").Select
    ActiveCell.FormulaR1C1 = "title"
    Save
    Next file
    End Sub

    any help would be great, thanks

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    860

    Re: Runtime Error 91 - object variable or with block variable not set

    What's wrong ???

    Why don't go further here ?
    http://www.excelforum.com/excel-prog...mn-titles.html
    Last edited by HSV; 02-26-2013 at 07:20 PM.
    Harry.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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