ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Declaring Procedure Variables (https://www.excelbanter.com/excel-programming/347924-declaring-procedure-variables.html)

cory

Declaring Procedure Variables
 
Thanks in advance for any help you can provide.
Using XL2000 on WinXP

I'm writing a procedure that uses Essbase to zoom-in or zoom-out on data
within a worksheet. I want to use the same procedure for the zoom-in as the
zoom-out, but have a variable tell the procedure what to do when it is called
(zoom-in or zoom-out). Here's my procedure declaration:

Sub Member_Zoom(ZoomDirection as ??)

When I call Member_Zoom, I want a list a possible values for ZoomDirection
to appear (i.e. In, Out) much like when you call a message box and the values
for the buttons appear (i.e. vbOkOnly, vbOk, etc).

Any ideas on how this is done? Thanks again.

Tom Ogilvy

Declaring Procedure Variables
 
At the top of a module

Public Enum Zoomtype
Zoom-in = -1
Zoom-out = 0
End Enum

Sub Member_Zoom(ZoomDirection as Zoomtype)


End sub

--
Regards,
Tom Ogilvy


"Cory" wrote in message
...
Thanks in advance for any help you can provide.
Using XL2000 on WinXP

I'm writing a procedure that uses Essbase to zoom-in or zoom-out on data
within a worksheet. I want to use the same procedure for the zoom-in as

the
zoom-out, but have a variable tell the procedure what to do when it is

called
(zoom-in or zoom-out). Here's my procedure declaration:

Sub Member_Zoom(ZoomDirection as ??)

When I call Member_Zoom, I want a list a possible values for ZoomDirection
to appear (i.e. In, Out) much like when you call a message box and the

values
for the buttons appear (i.e. vbOkOnly, vbOk, etc).

Any ideas on how this is done? Thanks again.




cory

Declaring Procedure Variables
 
Works like a dream. Thanks, Tom.

"Tom Ogilvy" wrote:

At the top of a module

Public Enum Zoomtype
Zoom-in = -1
Zoom-out = 0
End Enum

Sub Member_Zoom(ZoomDirection as Zoomtype)


End sub

--
Regards,
Tom Ogilvy



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com