LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
mb mb is offline
external usenet poster
 
Posts: 10
Default 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
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
Pass control back to Excel window [email protected] Excel Worksheet Functions 1 December 29th 06 07:24 PM
How to pass a variable into an SQL statement CLamar Excel Discussion (Misc queries) 0 June 5th 06 02:17 PM
How to pass a variable from Form back to calling procedure John[_111_] Excel Programming 4 August 21st 05 03:54 PM
Using Public to Pass Variable D.Parker Excel Programming 8 March 24th 05 10:39 PM
How to pass variable value between macros BCS Excel Programming 0 July 25th 03 08:01 PM


All times are GMT +1. The time now is 01:49 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"