Option Explicit
Sub updateReturn()
'
' updateReturn Macro
' Macro recorded 07/14/2005 by
'
' Keyboard Shortcut: Ctrl+r
'
Range("A5").Select
Cells.Find(What:="F00", after:=activeCell, LookIn:=xlFormulas, Lookat:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).activate
Dim Issue As String
Dim Date1 As String
Issue = Range("B3").Value
Date1 = Range("B2").Value
Do Until activeCell.Value = "F00----"
If activeCell.Value = "F00" Then
Cells.Find(What:="F00", after:=activeCell, LookIn:=xlFormulas, Lookat:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).activate
[B]
Else
Dim carry As String
Dim quantity As Integer
carry = activeCell.Value
activeCell.Offset([0], [2]).activate
quantity = activeCell.Value
activeCell.Offset([0], [-2]).activate
If quantity = "1" Then
[/B]
Windows("Equipment Log.xls").activate
Dim finish As Boolean
Dim index As Integer
index = 1
finish = False
Do Until finish = True
If index = 12 Then
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "YTG Stock #" + carry + " Not Found" ' Define message.
Style = vbOKOnly + vbExclamation + vbDefaultButton1 ' Define buttons.
Title = "Stock Number Not Found" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes.
MyString = "Yes" ' Perform some action.
End If
finish = True
Else
Worksheets(index).activate
Range("B4").Select
Do Until activeCell.Value = "" Or finish = True
If activeCell.Value = carry Then
activeCell.Offset([0], [3]).activate
activeCell = Date
finish = True
Else
activeCell.Offset([1], [0]).activate
End If
Loop
index = index + 1
End If
Loop
Else
End If
Windows("Material Reconciliation Slips.xls").activate
Cells.Find(What:="F00", after:=activeCell, LookIn:=xlFormulas, Lookat:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).activate
End If
Loop
'Windows("Equipment Log.xls").activate
'Worksheets(1).activate
'Windows("Material Reconciliation Slips.xls").activate
End Sub