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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable alerts in access 97

Status
Not open for further replies.

haka

MIS
Feb 28, 2002
5
GB
Can someone please let me know how I can turn off the error alerts that keep popping up whenever I run my macro. My macro involves deleting some cells and so the error message comes up to make sure its ok to delete, however this means that the application can never be automated as someone needs to be able to click yes for the macro to continu running.

 
If you're using a macro, then set the "Set Warnings" option to "No". But make SURE to set it back to yes at the end of the macro...

Line # Arguement Value
Line 1: Set Warnings (No)
Line 2 - X: YOUR STUFF (STUFF)
Last Line: Set Warnings (Yes)

Hope this helps Kyle ::)
 
Sorry you have lost me, all I have to fill in is the transfer type, spreadsheet type, table name, file name, has field names, and the range. All of this has been completed, what am I to do?
 
Sorry about that you're in Excel '97 not Access (I thought from the title you were using Access '97 macros...

How about you give me a little detail (maybe post some of the code) of what you're trying to do so the next advice I give will be of some use Kyle ::)
 
I'm in access 97 in the design view of my macro, however I am fairly happy to try and write the code in vb if it is simple.
 
No, you don't need to write this in VB if you've already got the macro done. Just insert a blank line above the line you're using and select the "Set Warnings" option from the Action drop-down and do it one more time in the end so it looks like what I put in my first post. Are you deleteing lines from an access table or an excel spreadsheet? If it's just withing Access evereything should be good to go, if it's excel, let me know and we can work on that too. Kyle ::)
 
Absoloute beauty it works (as you know) thanks thats a real help. Being cheeky do you know how I can now transfer a number of excel files all from 1 location C:\Temp\backup\ into my access table.

All of the file names start with backup and end with .xlk

At the minute I have my macro setup with a line of code for every workbook, which as you can imagin is far from great.

Thanks again for your help already.
 
With a Macro, no I don't think you can. You can do it with VBA, have it loop through the folder and get all the .xlk files and go to a sheet (or use the default sheet) and do your thing, but there will still be quite a few lines of code and if they each have different criteria then you're no better off (the code might actually be longer)

You could try converting your macro to VBA, go to the macro the Save As/Export and select "Convert to Visual Basic modual" and it will do the conversion for you so you can see what the code looks like... Kyle ::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top