I have a small macro that I'm having trouble with. On the first pass I am activating sheet 3 in the workbook with the command "Sheet3.Activate"
Following that I am looking for the min/max of a range of cells with the command, then storing the value into variable DataRMax.
Range("F31:G72").Find(Application.WorksheetFunction.Max(Range("F31:G72"))).Activate
DataRMax = ActiveCell.Value ' Finds Rising stage Max delay
After many other functions I basically call up this subroutine again and activate the next sheet with a command - Sheet4.Activate
I try to use the same range functions as above but it then stops the program and gives me an error
"Run-Time error 1004 - Application-defined or object-defined error.
As I run through the program everything works as expected, it activates sheet4, then tries to execute the range function. Do I need to to point to the active sheet in the range function somehow?
Bookmarks