Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old October 25th 05, 12:04 AM
hindsight
 
Posts: n/a
Default Pasting/Using Input Box Value


I've got a sub that runs a series of calculations, many of which are
based off a "MonthEndDate."

Currently, I input a date (like 9/30/05) in cell D4 and the first line
of code is:

'This row will be used in many other calculations
Range("D4").Name = "MonthEndDate"

This works fine for me as I know that I've got to enter a date in cell
D4, but if someone else is using the spreadsheet they don't know that.

What I'd like to do is, when the sub runs, have an inputbox appear, the
user enters a date and that date is used in the calculations. I guess
that value has to be pasted somewhere in the workbook for the formulas
to work?

This is all I've got... as you can see I'm stuck
Sub test1()

Dim EndDate As Long
EndDate = InputBox("Enter the Month Ending Report Date.", "End
Date")

End Sub

Best,

JB


--
hindsight
------------------------------------------------------------------------
hindsight's Profile: http://www.excelforum.com/member.php...fo&userid=6360
View this thread: http://www.excelforum.com/showthread...hreadid=478963


  #2   Report Post  
Old October 25th 05, 12:38 AM
Vacation's Over
 
Posts: n/a
Default Pasting/Using Input Box Value

See Ron de Bruin's Calendar control page at:

http://www.rondebruin.nl/calendar.htm


"hindsight" wrote:


I've got a sub that runs a series of calculations, many of which are
based off a "MonthEndDate."

Currently, I input a date (like 9/30/05) in cell D4 and the first line
of code is:

'This row will be used in many other calculations
Range("D4").Name = "MonthEndDate"

This works fine for me as I know that I've got to enter a date in cell
D4, but if someone else is using the spreadsheet they don't know that.

What I'd like to do is, when the sub runs, have an inputbox appear, the
user enters a date and that date is used in the calculations. I guess
that value has to be pasted somewhere in the workbook for the formulas
to work?

This is all I've got... as you can see I'm stuck
Sub test1()

Dim EndDate As Long
EndDate = InputBox("Enter the Month Ending Report Date.", "End
Date")

End Sub

Best,

JB


--
hindsight
------------------------------------------------------------------------
hindsight's Profile: http://www.excelforum.com/member.php...fo&userid=6360
View this thread: http://www.excelforum.com/showthread...hreadid=478963


  #3   Report Post  
Old October 25th 05, 12:43 AM
Gord Dibben
 
Posts: n/a
Default Pasting/Using Input Box Value

Sub testing()
Dim EndDate As Long
EndDate = InputBox("Enter The Month Ending Date", "End Date")
With Range("D4")
.Value = EndDate
.Name = "MonthEndDate"
End With
End Sub



Gord Dibben Excel MVP


On Mon, 24 Oct 2005 18:04:01 -0500, hindsight
wrote:


I've got a sub that runs a series of calculations, many of which are
based off a "MonthEndDate."

Currently, I input a date (like 9/30/05) in cell D4 and the first line
of code is:

'This row will be used in many other calculations
Range("D4").Name = "MonthEndDate"

This works fine for me as I know that I've got to enter a date in cell
D4, but if someone else is using the spreadsheet they don't know that.

What I'd like to do is, when the sub runs, have an inputbox appear, the
user enters a date and that date is used in the calculations. I guess
that value has to be pasted somewhere in the workbook for the formulas
to work?

This is all I've got... as you can see I'm stuck
Sub test1()

Dim EndDate As Long
EndDate = InputBox("Enter the Month Ending Report Date.", "End
Date")

End Sub

Best,

JB


  #4   Report Post  
Old October 25th 05, 02:48 PM
hindsight
 
Posts: n/a
Default Pasting/Using Input Box Value


Vacation & Gord,

Thanks for your reply's.

Gord - that's what I was looking for.

Vacation, I'll have to follow the link to check out Bruin's page.

Thanks again,

JB


--
hindsight
------------------------------------------------------------------------
hindsight's Profile: http://www.excelforum.com/member.php...fo&userid=6360
View this thread: http://www.excelforum.com/showthread...hreadid=478963



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
***Two Input Data Tables*** rbekka Excel Discussion (Misc queries) 1 October 21st 05 02:05 PM
input box Monty Excel Discussion (Misc queries) 2 October 7th 05 08:33 AM
Input cell reference is not valid (One Variable Data Table) Dottore Excel Worksheet Functions 9 September 1st 05 03:05 PM
Input Form vba help mdalzell Excel Discussion (Misc queries) 0 April 8th 05 03:57 PM
can you input time (hh:mm:ss) without having to input the colon i. Lexicon Excel Discussion (Misc queries) 4 January 11th 05 03:09 PM


All times are GMT +1. The time now is 01:59 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017