Ask Experts Questions for FREE Help !
Ask
    nicolebolin's Avatar
    nicolebolin Posts: 0, Reputation: 1
    New Member
     
    #1

    Feb 23, 2007, 10:55 AM
    Script Error In Visual Basic
    :confused: Please help...

    I am writring a macro in visual basic and am coming across an error. Here is the script:

    Sheets("AllSidneyPlantOrders").Select
    Range("O1").Select
    ActiveCell.FormulaR1C1 = "COMMENTS"
    Range("O2").Select
    ActiveCell.FormulaR1C1 = _
    "=IF((VLOOKUP(G6,'\\fs46nfa\vol1\OrdersDue\Plant8M acro\[2.16.07.xls]AllSidneyPlantOrders'!$G:$O,9,FALSE))=(VLOOKUP(M6, '\\fs46nfa\vol1\OrdersDue\Plant8Macro\[2.16.07.xls]AllSidneyPlantOrders'!$M:$O,3,FALSE)),(VLOOKUP(G6, '\\fs46nfa\vol1\OrdersDue\Plant8Macro\[2.16.07.xls]AllSidneyPlantOrders'!$G:$O,9,FALSE)))"
    Selection.FillDown
    Range("E3").Select
    ActiveWindow.DisplayZeros = False
    Columns("O:O").Select
    Selection.Font.Bold = False
    Selection.Font.Bold = True
    End Sub

    I am getting an error on the IF formaula line. I double checked the formula in excel and the formula is correct. If this is something I cannot do how can I write scipt a macro that will bring up a box to allow the user to pull in a specified file and then perform the scipt I have above?

Check out some similar questions!

Visual Basic [ 3 Answers ]

hi, I am using Access as my DB. I want to save a value in one table in DB. But the value am saving shd exists in database in another table. i.e. that value hs to be compared with the other table .Only if it exists then it has to be saved. How to do it.

Visual basic [ 1 Answers ]

Where do I go on my computer to find out what version of visual basic I have? Thanks

Visual basic [ 1 Answers ]

I am doing visual basic program. Could you help with the code how to login.

Visual Basic 6.0 [ 1 Answers ]

What is the cost of Visual Studio 6.0 Enterprise Edition?

Visual basic [ 1 Answers ]

How can I disable maximise button of a form but minimise and close button should be enable?


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.