ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Input Box (https://www.excelbanter.com/excel-programming/346265-input-box.html)

h0l1yw0od

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. :confused:

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


Don Guillett[_4_]

Input Box
 
You didn't really make it very clear but try
sheets("othersheet").range("a57")=inputbox(etc

--
Don Guillett
SalesAid Software

"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. :confused:

Thanks,


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




Bob Phillips[_6_]

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. :confused:

Thanks,


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

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




h0l1yw0od[_2_]

Input Box
 

Thats it.

Brilliant, thanks!:cool:


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


h0l1yw0od[_3_]

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. :cool:

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! :confused:

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



All times are GMT +1. The time now is 02:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com