From: MovingBeyondtheRecordButton on
How do I change an existing code from...

mynum = Application.InputBox("Select Submission_ID")

....to mynum is located in cell A4 on sheet 1 (ie use the number already
located in A4) with no InputBox

I've tried....
mynum = Worksheets("Sheet1").Cells(R4,C1)
mynum = Worksheets("Sheet1").Cells(4,1).Value
mynum = Range("A4")

I've even tried...
Range("A4").Select
mynum = ActiveCell

I just don't know how to tell it to input the number already contained in A4
as the input for the already existing code.
From: Gary Keramidas on
i'd use something like this

mynum = Worksheets("Sheet1").Range("A4").value


--


Gary Keramidas
Excel 2003


"MovingBeyondtheRecordButton"
<MovingBeyondtheRecordButton(a)discussions.microsoft.com> wrote in message
news:92920C94-A24F-4598-A145-DDE8FB1257EE(a)microsoft.com...
> How do I change an existing code from...
>
> mynum = Application.InputBox("Select Submission_ID")
>
> ...to mynum is located in cell A4 on sheet 1 (ie use the number already
> located in A4) with no InputBox
>
> I've tried....
> mynum = Worksheets("Sheet1").Cells(R4,C1)
> mynum = Worksheets("Sheet1").Cells(4,1).Value
> mynum = Range("A4")
>
> I've even tried...
> Range("A4").Select
> mynum = ActiveCell
>
> I just don't know how to tell it to input the number already contained in
> A4
> as the input for the already existing code.

From: Don Guillett on

I see no reason that your second one would not work
mynum = Worksheets("Sheet1").Cells(4,1).Value

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett(a)gmail.com
"MovingBeyondtheRecordButton"
<MovingBeyondtheRecordButton(a)discussions.microsoft.com> wrote in message
news:92920C94-A24F-4598-A145-DDE8FB1257EE(a)microsoft.com...
> How do I change an existing code from...
>
> mynum = Application.InputBox("Select Submission_ID")
>
> ...to mynum is located in cell A4 on sheet 1 (ie use the number already
> located in A4) with no InputBox
>
> I've tried....
> mynum = Worksheets("Sheet1").Cells(R4,C1)
> mynum = Worksheets("Sheet1").Cells(4,1).Value
> mynum = Range("A4")
>
> I've even tried...
> Range("A4").Select
> mynum = ActiveCell
>
> I just don't know how to tell it to input the number already contained in
> A4
> as the input for the already existing code.

From: tompl on
Try this:
mynum = Worksheets("Sheet1").Range("A4").Value

Tom


"MovingBeyondtheRecordButton" wrote:

> How do I change an existing code from...
>
> mynum = Application.InputBox("Select Submission_ID")
>
> ...to mynum is located in cell A4 on sheet 1 (ie use the number already
> located in A4) with no InputBox
>
> I've tried....
> mynum = Worksheets("Sheet1").Cells(R4,C1)
> mynum = Worksheets("Sheet1").Cells(4,1).Value
> mynum = Range("A4")
>
> I've even tried...
> Range("A4").Select
> mynum = ActiveCell
>
> I just don't know how to tell it to input the number already contained in A4
> as the input for the already existing code.
From: MovingBeyondtheRecordButton on
Thanks...that works perfectly! Now that I have it working for one cell I
need to start working on making it loop for the Range("A44:A40").

"tompl" wrote:

> Try this:
> mynum = Worksheets("Sheet1").Range("A4").Value
>
> Tom
>
>
> "MovingBeyondtheRecordButton" wrote:
>
> > How do I change an existing code from...
> >
> > mynum = Application.InputBox("Select Submission_ID")
> >
> > ...to mynum is located in cell A4 on sheet 1 (ie use the number already
> > located in A4) with no InputBox
> >
> > I've tried....
> > mynum = Worksheets("Sheet1").Cells(R4,C1)
> > mynum = Worksheets("Sheet1").Cells(4,1).Value
> > mynum = Range("A4")
> >
> > I've even tried...
> > Range("A4").Select
> > mynum = ActiveCell
> >
> > I just don't know how to tell it to input the number already contained in A4
> > as the input for the already existing code.