Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Vlookup In Vba/excel, Can't doooooo it :(
Dagoth Nereviar
post Mar 5 2007, 11:18 AM
Post #1


Privileged Member
*********

Group: [HOSTED]
Posts: 524
Joined: 19-May 06
From: Leeds, UK
Member No.: 23,963



What I'm trying to do is have it that when you click a command button ("CommandButton1" name will be changed later on tongue.gif), it looks up a value on the work sheet "TimeTable" and changes the caption ("Label1" again will change it tongue.gif) on the form "UserForm1".

What I have is some simple code:
CODE
Private Sub CommandButton1_Click()

Label1.Caption = Application.WorksheetFunction.VLookup("Gateway Plaza", "C3:C26", 1, False)

End Sub


At first I kept getting "Run time error 13" but I added "WorksheetFunction" and then I started getting "Run time error 1004: Unable to get the Vlookup property of the WorksheetFunction Class"

How do I fix it?

Edit: Haha, I didn't need to use Vlookup laugh.gif All I had to do was:
Label1.Caption = Range("C3") laugh.gif

Close topic please tongue.gif

This post has been edited by Dagoth Nereviar: Mar 5 2007, 11:26 AM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Excel Vb Form(2)
  2. Car Race In Excel(2)
  3. Export Mp3 Filename To Excel File(9)
  4. Ms Excel : Search A Sheet(4)
  5. Excel 97 Easter Egg(5)
  6. Excel(0)
  7. Import From Excel File Into Mysql Database(7)
  8. Microsoft Excel For Engineers & Scientists(3)
  9. Ms Excel Graphic Issues(4)
  10. 100+ Videos About Excel, Access And Crystal Xcelsius(1)
  11. Google Spreadsheets: A Threat To Excel?(33)
  12. Excel, Third Makes Deprives It Of Patch In One Week(0)
  13. Pacelman & Cellvader(3)
  14. Excel For Internet(5)
  15. How To Group Multiple Sets Of Data In Microsoft Excel 2007(0)
  1. Help Needed With Excel Formulas(4)
  2. New Security Hole Discovered In Excel(0)
  3. Excel & Finance(0)


 



- Lo-Fi Version Time is now: 5th July 2008 - 11:23 PM