O
OTWarrior via OfficeKB.com
I have added some code to my access form, which exports to excel in several
sheets.
The code is:
.ActiveWindow.SelectedSheets.Delete
this deletes the current sheet (which i have to do, as i copy data from it,
and this makes the sheet redundant).
However, the problem is the delete function brings up a dialog box asking you
to confirm the deletion, which i want to bypass/automatically select ok.
I ran a macro to get this code, so i guessed it would show all the workings
(which it doesn't)
Since this is not a normal dialog box, I could not get the VBbuttonok etc to
work.
How can I autoselect ok on the messagebox? Or is there a better way of
deleting a worksheet?
sheets.
The code is:
.ActiveWindow.SelectedSheets.Delete
this deletes the current sheet (which i have to do, as i copy data from it,
and this makes the sheet redundant).
However, the problem is the delete function brings up a dialog box asking you
to confirm the deletion, which i want to bypass/automatically select ok.
I ran a macro to get this code, so i guessed it would show all the workings
(which it doesn't)
Since this is not a normal dialog box, I could not get the VBbuttonok etc to
work.
How can I autoselect ok on the messagebox? Or is there a better way of
deleting a worksheet?