Hi, sorry i'm new to the forums and need some help.
I'm trying to write an If Statement in Excel VBA but it is not working and i think it would probbably be something small that i missed but i still cant get my head around it.
Basically i want to copy data from CurrentOrder to Database, which i can do, but i want to add a message box that says "Error" if the second sheet doesnt exist, ie has been deleted, moved or renamed. This is the coding i have done, i have indented the part where the error occurs:
If i run the code without the If statement it works fine, but if i use the if statement and change the sheet nam it doesn't work.
Sorry if it is something small but like i said i just can't get my head around it, any help would be much appreciated.
Cheers, Kezzby
Bookmarks