How to return reference to sheet1 in excel

This spreadsheet was updated from MS Office 2012 to MS Office 2013.  Now code I used before sheet1.cells(5,2) comes back and tell me application-defined or object defined error.  So somewhere I lost a reference.   could someone please tell me how to get It back.  I cant seem to use sheet2.activate or anything referencing the sheets.

thanks
mgmhicksAsked:
Who is Participating?
 
FarWestConnect With a Mentor Commented:
it should  work!! can you see sheet1 in project explorer in code window?

make sure that you have at least those references in the project
excelref.jpgif still not working try this
dim sheet1 as worksheet
set sheet1 = activeworkbook.worksheets(1)

Open in new window

0
 
NorieVBA ExpertCommented:
Can we see the rest of the code?
0
 
Santosh GuptaCommented:
MS Office 2012 ??
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
mgmhicksAuthor Commented:
this doesn't work  sheet1.Cells(5, 2)

but this does work cells(5,2)
0
 
mgmhicksAuthor Commented:
I know right.  I have other worksheets that are just fine.  Here are my references.

References.png
0
 
FarWestCommented:
I think references are fine
can you see sheet1 as this excelproj.jpg
0
 
mgmhicksAuthor Commented:
Yes, I do.   it does the same for other sheets within the same workbook.
0
 
FarWestCommented:
Will you send me the file. You can remove any data inside but keep the sheets. And make sure that the problem still exists in the uploaded file
BTW did the code I gave you before solved the problem?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.