Heyitslopes
New Member
- Joined
- Jun 7, 2016
- Messages
- 9
I'm trying to use the Define name function in excel but I want to use it in VBA
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim BidQTY As Range
Dim BidUP As Range
Set BidQTY = Sheets("Job to Date").Range("D1:D10")
Set BidUP = Sheets("Job to Date").Range("E1:E10")
Sheets("Job to Date").Range("F1").Formula = BidQTY * BidUP
End Sub
I have this bit of code right now but i'm getting an error on the last line?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim BidQTY As Range
Dim BidUP As Range
Set BidQTY = Sheets("Job to Date").Range("D1:D10")
Set BidUP = Sheets("Job to Date").Range("E1:E10")
Sheets("Job to Date").Range("F1").Formula = BidQTY * BidUP
End Sub
I have this bit of code right now but i'm getting an error on the last line?