right now this code calls one in a series of subs based on text from a cell. I want to call command buttons with the same names instead, so that i can use application.caller to not have so many nearly identical sub routines.
'###################
Workbooks(1).Activate
searchrange = Worksheets("Form").Range("D46:D2000")
With searchrange
Cells.Find(What:=Bnum, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False).Activate
ActiveCell.Offset(-2, -2).Select
strText2 = ActiveCell.Value
reportNum2 = Right(strText2, 2)
'these next lines call the associated "Newpage*" sub. If they can be
'changed to instead call the button of the same name that will great!
CurRepNum = "newpage" & reportNum2
Application.Run "newpage" & reportNum2
'###################
Any suggestions would be greatly appreciated!
Willardio
Bookmarks