This is a little hard to explain so bear with me.
I'm trying to dim a value, call a sub and use that dimmed value within the sub.
I'm still pretty new at VBA so any help would be appreciated. I'm creating a program for my investment society. I wrote the code all out in a new way. When I tried it and it totally flopped because of this reason. So close and yet so far!
I'm trying to dim a value, call a sub and use that dimmed value within the sub.
Code:
Sub InitialSub()
Dim Value1, Value2, Value3 As Double
Value1 = Worksheets("Sheet1").Range("A1")
Value1 = Worksheets("Sheet1").Range("A2")
Sub2
Worksheets("Sheet1").Range("A3") = Value3
End Sub
Sub Sub2()
Value3 = Value1 + Value2
End Sub
I'm still pretty new at VBA so any help would be appreciated. I'm creating a program for my investment society. I wrote the code all out in a new way. When I tried it and it totally flopped because of this reason. So close and yet so far!