Results 1 to 5 of 5

Using Vlookup to update a string

Threaded View

synkarius Using Vlookup to update a... 06-06-2010, 02:15 AM
royUK Re: Using Vlookup to update a... 06-06-2010, 02:43 AM
synkarius Re: Using Vlookup to update a... 06-06-2010, 03:55 AM
royUK Re: Using Vlookup to update a... 06-06-2010, 04:03 AM
synkarius Re: Using Vlookup to update a... 06-06-2010, 04:58 AM
  1. #1
    Registered User
    Join Date
    06-06-2010
    Location
    Seoul
    MS-Off Ver
    Excel 2007
    Posts
    5

    Unhappy Using Vlookup to update a string

    Hi all. Here's my problem. I've declared some variables as follows:

    Public activityone As String 
    Public allactivities As Range

    I'm using public variables because I'm lazy. I set allactivities:

    Set allactivities = Worksheets("data").Range("G5:N14")

    Problem: When I run the following code, I get a "Runtime error 1004: Application-defined or object-defined error":

    activityone = Worksheets("data").Range("G19").Value
    If MTdone = True Then
            activityone = Application.WorksheetFunction.VLookup(activityone, allactivities, 2, False)
    End If

    What am I doing wrong? It only happens when MTdone is True, so it has to be that line of code.
    Last edited by synkarius; 06-06-2010 at 06:28 AM. Reason: solved: invalid question

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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