Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Accesing a second workbook

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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Accesing a second workbook

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" wrote in message
...
|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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accesing Word Document from Excel??? wjoc1[_3_] Excel Programming 1 July 11th 05 04:46 PM
Accesing to excel macros by COM wakeup[_2_] Excel Programming 0 June 14th 05 03:31 PM
accesing controls in for each loop Gixxer_J_97[_2_] Excel Programming 1 May 25th 05 05:30 AM
Accesing vba project from wb that has vba project password protected cassidyr1 Excel Programming 2 July 3rd 04 01:49 PM
Accesing a combobox control via it index propertie in VBA, Is itPossible? Muxer Excel Programming 3 July 30th 03 08:20 PM


All times are GMT +1. The time now is 03:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"