Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pass a variable back to the host script?
How do I pass the end result of a subroutine back to the host script? In
the example below I would like the next_week to come back to the Pull_Forward. Public Sub Pull_Forward() num = InputBox("Enter the range (in calendar days) you wish to include in the Pull Forward Calculation: ") Call Module1.current_date(num) Call Module1.Pull_Fwd End Sub Private Sub current_date(num) today = Date today = Format(today, "mm/dd") next_week = DateAdd("d", num, today) next_week = Format(next_week, "mm/dd") MsgBox (next_week) End Sub Thanks, mb |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pass control back to Excel window | Excel Worksheet Functions | |||
How to pass a variable into an SQL statement | Excel Discussion (Misc queries) | |||
How to pass a variable from Form back to calling procedure | Excel Programming | |||
Using Public to Pass Variable | Excel Programming | |||
How to pass variable value between macros | Excel Programming |