#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Input Box


Hi everyone,

Could someone help me with the code for an input box please.

I've got it to display the box but i need to put in the code that wil
send the input data to a cell on another page and add it to the figur
already there.

The code i have so far is:

---
Dim NumberOfItems As Integer
NumberOfItems = InputBox("How many items were in the batch?", "Ente
Amount.")
---

The macro needs to look at cell C4 to see the name of the employee an
then find the appropriate worksheet and enter the contents of the inpu
box in to cell A57 on that sheet.

I've been looking at this for a few days and i've not been able t
figure it out yet. Any help would be useful.

Thanks

--
h0l1yw0o
-----------------------------------------------------------------------
h0l1yw0od's Profile: http://www.excelforum.com/member.php...fo&userid=2898
View this thread: http://www.excelforum.com/showthread.php?threadid=48719

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Input Box

Sounds like you need

Worksheets(Range("C4").Value).Range("A57").Value = NumberOfItems

--

HTH

RP
(remove nothere from the email address if mailing direct)


"h0l1yw0od" wrote
in message ...

Hi everyone,

Could someone help me with the code for an input box please.

I've got it to display the box but i need to put in the code that will
send the input data to a cell on another page and add it to the figure
already there.

The code i have so far is:

---
Dim NumberOfItems As Integer
NumberOfItems = InputBox("How many items were in the batch?", "Enter
Amount.")
---

The macro needs to look at cell C4 to see the name of the employee and
then find the appropriate worksheet and enter the contents of the input
box in to cell A57 on that sheet.

I've been looking at this for a few days and i've not been able to
figure it out yet. Any help would be useful.

Thanks,


--
h0l1yw0od
------------------------------------------------------------------------
h0l1yw0od's Profile:

http://www.excelforum.com/member.php...o&userid=28989
View this thread: http://www.excelforum.com/showthread...hreadid=487193



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Input Box


Thats it.

Brilliant, thanks!


--
h0l1yw0od
------------------------------------------------------------------------
h0l1yw0od's Profile: http://www.excelforum.com/member.php...o&userid=28989
View this thread: http://www.excelforum.com/showthread...hreadid=487193

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Input Box


Hi again,

I've been fiddling with this as i've just noticed that i didn't explain
properly that the contents of the Input box need to be added to the
contents of cell A57 that are already there.

From your answer of:

Worksheets(Range("C4").Value).Range("A57").Value = NumberOfItems

I have tried adding ...Value = range("A57") + NumberOfItems and various
combinations of A57 + NumberOfItems but i just can't seem to find the
correct phrasing for it.

This works perfectly except for this one small detail.

It would also be helpful if you could just explain how the code you've
already given works as i can't see how it applies the worksheet name to
the word 'range' or 'value'.

Sorry if this all sounds stupid, i'm still trying to get to grips with
VB!

Thanks again.


--
h0l1yw0od
------------------------------------------------------------------------
h0l1yw0od's Profile: http://www.excelforum.com/member.php...o&userid=28989
View this thread: http://www.excelforum.com/showthread...hreadid=487193

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
How to input pictures automatically based on cell input? bsharp Excel Worksheet Functions 9 May 30th 09 07:16 AM
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM
How do I add input data in the input ranges in drop down boxes. oil_driller Excel Discussion (Misc queries) 1 November 9th 05 10:31 PM
=SUMIF(Input!H2:H718,AZ19,Input!E2:E685)AND(IF ALex Excel Worksheet Functions 2 March 14th 05 09:19 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


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