View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Stopher Stopher is offline
external usenet poster
 
Posts: 67
Default Vlookup on second WorkBook


Patrick Simonds wrote:
I have two workbooks Able and Baker. When I click on a cell in Able a
UserForm is displayed. On this UserForm I click on a name (from a list of
names) in ListBox1. Then I want to click on a button labeled Edit which will
take me to WorkBook Baker (worksheet called Names) and select the cell which
contains the name I selected in ListBox1. I just can not figure out what
code to assign to the Edit button to make this happen.


Is the name you select in listbox1 unique to Names and does it have a
specific column?

To open the new workbookuse:

Sub {insert name of command button here} ()

Workbook("Baker").Sheets("Names").Activate
Range ("A1").select

Then we need to work out what coulun we are searching in and do an
index or match or vlookup or something similar in code. Then decide
what you want to do once you have found the cell, just got to the cell
or do something with another variable in the row?

Regards

Stopher