jdmetcalfe
New Member
- Joined
- Dec 8, 2012
- Messages
- 8
Hi i'm pretty new to vba and having real trouble with what should be a simple code.
I have the following vba code which works fine
Sub printlist()
If UCase(Range("T6").Value) = "1" Then Call stocksheetsub
If UCase(Range("T6").Value) = "2" Then Call supplier2sub
End Sub
However instead of using the cell value T6 i would like to replace this with a defined name so
Sub printlist()
If UCase(Range("reportlist").Value) = "1" Then Call stocksheetsub
If UCase(Range("reportlist").Value) = "2" Then Call supplier2sub
End Sub
Everything i try i just get errors. Any help would be much apreciated.
Thanks
James
I have the following vba code which works fine
Sub printlist()
If UCase(Range("T6").Value) = "1" Then Call stocksheetsub
If UCase(Range("T6").Value) = "2" Then Call supplier2sub
End Sub
However instead of using the cell value T6 i would like to replace this with a defined name so
Sub printlist()
If UCase(Range("reportlist").Value) = "1" Then Call stocksheetsub
If UCase(Range("reportlist").Value) = "2" Then Call supplier2sub
End Sub
Everything i try i just get errors. Any help would be much apreciated.
Thanks
James