B
BillShut
This is my code, why does the first thing it does is unhide
personal.xls. This code is in a module in personal.xls.
Thanks
Bill
Sub CopyTest()
ActiveWindow.Zoom = 75
Cells.Find(what:="Reference:").Activate
ActiveCell.Offset(0, 1).Select
ActiveCell.Copy
MsgBox "Press the Enter key to continue"
Application.OnKey "~", "'StartSub " & 0 & ",False'"
Cells.Find(what:="Comments:").Activate
ActiveCell.Select
Dim Rng As Range
On Error Resume Next
Set Rng = Application.InputBox(prompt:="Choose A Range", Type:=8)
Rng.Copy
rsp = "onwards"
If rsp = "" Then End
Set foundcell = Cells.Find(what:=rsp)
' Set foundcell = ActiveSheet.Cells.Find(what:="onwards")
If foundcell Is Nothing Then
MsgBox ("Not found")
Else
Application.Goto ActiveSheet.Range("A" & foundcell.Row - 2),
Scroll:=True
ActiveCell.Offset(5, 2).Select
End If
End Sub
personal.xls. This code is in a module in personal.xls.
Thanks
Bill
Sub CopyTest()
ActiveWindow.Zoom = 75
Cells.Find(what:="Reference:").Activate
ActiveCell.Offset(0, 1).Select
ActiveCell.Copy
MsgBox "Press the Enter key to continue"
Application.OnKey "~", "'StartSub " & 0 & ",False'"
Cells.Find(what:="Comments:").Activate
ActiveCell.Select
Dim Rng As Range
On Error Resume Next
Set Rng = Application.InputBox(prompt:="Choose A Range", Type:=8)
Rng.Copy
rsp = "onwards"
If rsp = "" Then End
Set foundcell = Cells.Find(what:=rsp)
' Set foundcell = ActiveSheet.Cells.Find(what:="onwards")
If foundcell Is Nothing Then
MsgBox ("Not found")
Else
Application.Goto ActiveSheet.Range("A" & foundcell.Row - 2),
Scroll:=True
ActiveCell.Offset(5, 2).Select
End If
End Sub