I've put in the following code and it seems to work well. Now I'm wanting to add an input box to tell the user to select a "case" instead of using the cell selected before clicking the button I have assigned to this macro.
Here's the code I have that is working
When I try to add the Input Box. I am obviously not even close
I tried taking out the if statements to just get the selection to work, but my offset portion does not work either.
Any help would be greatly appreciated!!!!
Thanks,
PIGUY
Here's the code I have that is working
Code:
Sub MoveCase()
'Move Case from one slot to another
Dim rngArea As Range
Set rngArea = Range("d2:d50,s2:s50") 'defined range
If Application.Intersect(rngArea, ActiveCell) Is Nothing Then
MsgBox ("You did not click a case")
Else
ActiveCell.Offset(, -3).Select
ActiveCell.Resize(, 14).Select
Selection.Cut
Range("A20").Select
Selection.Insert Shift:=xlDown
MsgBox "The case has been moved"
End If
End Sub
When I try to add the Input Box. I am obviously not even close
Code:
Dim ActiveCell As Range
Set ActiveCell = Application.InputBox(prompt:="Select a case from Column D or S", Type:=8)
ActiveCell.Offset(0, -3).Select
ActiveCell.Resize(, 14).Select
ActiveCell.Cut
Range("A20").Select
Selection.Insert Shift:=xlDown
MsgBox "The case has been moved"
Any help would be greatly appreciated!!!!
Thanks,
PIGUY