Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using the value in the inputbox again


Here is the code I have so far:

Sub Kit1()
Sheets("Sheet1").Select
Dim rng As Range
Set rng = Cells(Rows.Count, "A").End(xlUp)
If Not IsEmpty(rng) Then
If rng.Value = Date Then Exit Sub
Set rng = rng.Offset(1, 0)
End If

rng.Value = Date

rng.Offset(0, 4).Value = InputBox("How many kits?")


Sheets("Sheet2").Select
Dim rng1 As Range
Set rng1 = Cells(Rows.Count, "A").End(xlUp)
If Not IsEmpty(rng) Then
If rng1.Value = Date Then Exit Sub
Set rng1 = rng1.Offset(1, 0)
End If

rng1.Value = Date

End Sub

Now how do I take the value in sheet 1 from the input box, and put the
same value in sheet 2 in column E again without having to put up
another inputbox?


--
cappuccine
------------------------------------------------------------------------
cappuccine's Profile: http://www.excelforum.com/member.php...o&userid=28242
View this thread: http://www.excelforum.com/showthread...hreadid=482369

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using the value in the inputbox again


add

rng1.Offset(0, 4).Value = rng.Offset(0, 4).Value

after

rng1.Value = Dat

--
dok11
-----------------------------------------------------------------------
dok112's Profile: http://www.excelforum.com/member.php...fo&userid=1058
View this thread: http://www.excelforum.com/showthread.php?threadid=48236

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using the value in the inputbox again


Hello Capuccine,

Store the InputBox result in a variable. Here is your code with the
additions.


Code:
--------------------
Sub Kit1()

Dim Answer
Dim rng As Range
Dim rng1 As Range

Sheets("Sheet1").Select

Set rng = Cells(Rows.Count, "A").End(xlUp)

If Not IsEmpty(rng) Then
If rng.Value = Date Then Exit Sub
Set rng = rng.Offset(1, 0)
End If

rng.Value = Date

Answer = InputBox("How many kits?")
rng.Offset(0, 4). Value = Answer

Sheets("Sheet2").Select

Set rng1 = Cells(Rows.Count, "A").End(xlUp)

If Not IsEmpty(rng) Then
If rng1.Value = Date Then Exit Sub
Set rng1 = rng1.Offset(1, 0)
End If

rng1.Value = Date
rng1.Offset(0, 4). Value = Answer

End Sub

--------------------

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=482369

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using the value in the inputbox again


Thanks! My macro is almost complete! Thanks for all the help.


--
cappuccine
------------------------------------------------------------------------
cappuccine's Profile: http://www.excelforum.com/member.php...o&userid=28242
View this thread: http://www.excelforum.com/showthread...hreadid=482369

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
inputbox brownti via OfficeKB.com Excel Discussion (Misc queries) 2 February 9th 07 02:37 PM
Value in a inputbox Alvin Hansen[_2_] Excel Programming 3 February 22nd 05 08:15 PM
Inputbox and Application.InputBox Maria[_7_] Excel Programming 1 September 20th 04 11:36 AM
Inputbox sadik Excel Programming 3 February 19th 04 07:14 PM
inputbox Lawson Excel Programming 2 October 7th 03 08:58 PM


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

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"