I have the below code that works fine when I run it on my computer using 2007. When my associates try to run it using 2003 it doesnt work. I can't figure out what I need to change in order for it to work across the board.
here is the code:
Sub ClientUpdate()
Dim MySheet As String, MyBook As String, IMName As String
Dim MyNum As Integer
IMName = Range("A1").Value
MySheet = Left(IMName, 31)
MyNum = Range("A15").Value
MyBook = ActiveWorkbook.Name
Windows("New Open Funds.xls").Activate
Sheets("Project 3").Select
Range("A1").Select
Cells.Find(What:=IMName, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 5).Range("A1:A" & MyNum).Select
Selection.Copy
Windows(MyBook).Activate
Sheets(MySheet).Select
Range("B17").Select
ActiveSheet.Paste
End Sub
END OF CODE
Essentially what it is doing is searching an excel file for a value and selecting a specific number of cells from the offset of finding that value. There are several variables that have to pull from the orignal sheet that is running the macro and I need those variable to be pull from the sheet so that I can have different values on different sheets. It works on 2007 as I said but I cant get it to work with 2003. No idea why.
I am relatively new to VBA and have worked this out based on previous forum questions and utilizing the macro recorder on 2007.
Thanks for your help.
Bookmarks