wow you're genius!!! thank you....
ok so i i tried copying ur modifed code and
first i get a compile error "sub or function not defined" then i click ok and it highlights "Set xlRange = Range("A2", "L18")" i see that xlsheet is not there so i put this in "xlSheet.Range" which gets rid of the error and
it opens the spreadsheet but doesnt format it
then when i close the spreadsheet it returns me to access and gives the following error "Run-time error '1004' Application-defined or object-defined error" and highlights the following code line
lngLastRow = xlSheet.Range("A65536").End(xlUp).Row
so it seems like its stoping right after it renames the sheet tab in excel. What i dont understand is I've defined lngLastRow at the top as Long, so it is defined... does it not recognize it??
if i comment this line out then it proceeds to the next lines but gets hung on "xlRange.HorizontalAlignment = xlCenter" and gives the error of "access unable to set the horizontalalignment property of the range class" so i try -4108 instead of xlcenter, still doesnt like it.. if i comment this out then it gets stuck on the next line...
am i missing something? we have everything defined correctly then why doesnt it like any of the code after we have renamed the spreadsheet?
ok so i i tried copying ur modifed code and
first i get a compile error "sub or function not defined" then i click ok and it highlights "Set xlRange = Range("A2", "L18")" i see that xlsheet is not there so i put this in "xlSheet.Range" which gets rid of the error and
it opens the spreadsheet but doesnt format it
then when i close the spreadsheet it returns me to access and gives the following error "Run-time error '1004' Application-defined or object-defined error" and highlights the following code line
lngLastRow = xlSheet.Range("A65536").End(xlUp).Row
so it seems like its stoping right after it renames the sheet tab in excel. What i dont understand is I've defined lngLastRow at the top as Long, so it is defined... does it not recognize it??
if i comment this line out then it proceeds to the next lines but gets hung on "xlRange.HorizontalAlignment = xlCenter" and gives the error of "access unable to set the horizontalalignment property of the range class" so i try -4108 instead of xlcenter, still doesnt like it.. if i comment this out then it gets stuck on the next line...
am i missing something? we have everything defined correctly then why doesnt it like any of the code after we have renamed the spreadsheet?