Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

macro question

Status
Not open for further replies.

stuckagain1

Technical User
May 3, 2004
86
US
i have a macro that uses a dlookup command in the condition column. the macro stops here if the table that the dlookup command is looking in does not exist (the table exists to the extent there has been no user error). what is the best way to verify that the table exists, and if not, give message to user and then stop macro?

thanks!
 
stuckagain1,

Macros do not have good error trapping (Some people say step away from the keyboard with macros). I would suggest you select your macro (highlight it ) then from the Tools menu select Macro then select Convert Macro to Visual Basic. Then you can add real error trapping or test for your file.



[thumbsup2]




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top