Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Remote module call

I have 2 open workbooks Able and Baker

In WorkBook Able I call a Userform which has a ListBox. The ControlSource
for the ListBox is a range located on WorkBook Baker. The ListBox shows a
list of employees and their department. I want a sort button on my UserForm
which will run a sort routine on the workbook Baker which has the employee
data.

I have the Sort routines defined on WorkBook Baker :

Module1.SortByName
Module1.SortByDepartment

But how do I run the sort module on WorkBook Baker without leaving WorkBook
Able?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Remote module call

Patrick Simonds wrote:

I have 2 open workbooks Able and Baker

In WorkBook Able I call a Userform which has a ListBox. The
ControlSource for the ListBox is a range located on WorkBook Baker.
The ListBox shows a list of employees and their department. I want a
sort button on my UserForm which will run a sort routine on the
workbook Baker which has the employee data.

I have the Sort routines defined on WorkBook Baker :

Module1.SortByName
Module1.SortByDepartment

But how do I run the sort module on WorkBook Baker without leaving
WorkBook Able?


Application.Run "'Baker'!SortByName"
or if you have parameters
Application.Run "'Baker'!SortByName", Parameter1, Parameter2,..

Workbook Baker shouldbe open.


--

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Remote module call

Application.Run "Baker.xls!SortByName"

--
Regards,
Tom Ogilvy

"Patrick Simonds" wrote in message
...
I have 2 open workbooks Able and Baker

In WorkBook Able I call a Userform which has a ListBox. The ControlSource
for the ListBox is a range located on WorkBook Baker. The ListBox shows
a
list of employees and their department. I want a sort button on my
UserForm
which will run a sort routine on the workbook Baker which has the employee
data.

I have the Sort routines defined on WorkBook Baker :

Module1.SortByName
Module1.SortByDepartment

But how do I run the sort module on WorkBook Baker without leaving
WorkBook
Able?




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
The remote procedure call failed. (Exception from HRESULT: 0x80070 Avinash [email protected] Excel Worksheet Functions 0 December 22nd 08 12:20 PM
Remote module call Patrick Simonds Excel Programming 1 April 3rd 06 04:14 AM
Call a Module mb Excel Programming 2 October 26th 05 01:12 AM
Call other sub in the same module yangyh[_4_] Excel Programming 1 September 11th 05 09:24 AM
remote module karin Excel Programming 2 May 14th 04 08:06 PM


All times are GMT +1. The time now is 06:00 AM.

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

About Us

"It's about Microsoft Excel"