PC Review


Reply
Thread Tools Rate Thread

Accesing a second workbook

 
 
Patrick Simonds
Guest
Posts: n/a
 
      10th Apr 2006
I have a UserForm which is called from Workbook1. The userform has a LiskBox
which is populated from a range of cells on Workbook2, worksheet named
Employees.

What I would like to do is include some Textboxes which are also populated
from Workbook2, based on what is selected in the Listbox. The ListBox data
comes from Column A (combined First and Last name) and column B is the First
Name only, column C Is last Name only and column D is department code.

So I guess what I need is code that, while not making Worbook2 active, will
find the value selected in the Lisbox and then select the source cell on
Workbook2.


 
Reply With Quote
 
 
 
 
Jim Rech
Guest
Posts: n/a
 
      10th Apr 2006
Something like this perhaps:

With Workbooks("Book2.xls").Worksheets("Sheet1")
TextBox1.Text = .Range("A1").Value
TextBox2.Text = .Range("A2").Value
End With

--
Jim
"Patrick Simonds" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
|I have a UserForm which is called from Workbook1. The userform has a
LiskBox
| which is populated from a range of cells on Workbook2, worksheet named
| Employees.
|
| What I would like to do is include some Textboxes which are also populated
| from Workbook2, based on what is selected in the Listbox. The ListBox data
| comes from Column A (combined First and Last name) and column B is the
First
| Name only, column C Is last Name only and column D is department code.
|
| So I guess what I need is code that, while not making Worbook2 active,
will
| find the value selected in the Lisbox and then select the source cell on
| Workbook2.
|
|


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
accesing XML George jones Microsoft Dot NET 1 22nd Jan 2007 11:18 AM
ACCESING =?Utf-8?B?TmVsc29u?= Windows XP Internet Explorer 1 1st Jun 2006 04:25 PM
accesing a dos prompt marcelo Microsoft Windows 2000 CMD Promt 2 18th Jan 2004 06:30 PM
XP Pro slow when accesing HD Jaffo Windows XP Help 1 7th Jan 2004 09:45 PM
Accesing wps files jeff Windows XP General 1 19th Oct 2003 02:37 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:10 PM.