Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Access an open workbook without making it active
Is there any way to run my code below without actually making workbook
Employee_List active? It is open in the background. Private Sub Edit_Name_Click() If ListBox1.Value = " " Then GoTo BlankList Unload EmployeeList Application.ScreenUpdating = False Application.EnableEvents = False Dim rng As Range, rng1 As Range Dim sStr As String Set rng = Workbooks("EmployeeList.xlsm").Worksheets("Employe e_List").Cells sStr = Me.TextBox1.Value Set rng1 = rng.Find(What:=sStr, _ After:=Range("IV65536"), _ LookIn:=xlFormulas, _ LookAt:=xlWhole, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not rng1 Is Nothing Then Workbooks("EmployeeList.xlsm").Activate ActiveWorkbook.Worksheets("Employee_List").Activat e rng1.Select Else MsgBox sStr & " not found" End If Application.Run "EmployeeList.xlsm!UpdateName" Application.ScreenUpdating = True Workbooks("Vacation - Leave Book Master.xls").Activate EmployeeList.Show Application.EnableEvents = True BlankList: End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Range from Open Workbook to Active Workbook | Excel Programming | |||
Access current active workbook from DLL | Excel Programming | |||
Making an open workbook active | Excel Programming | |||
Get range value active workbook on open add-in | Excel Programming | |||
How do I make an open workbook the active workbook | Excel Programming |