VBA code on how to skip macro while not responding

daniendar

New Member
Joined
May 16, 2012
Messages
2
I have create excel VBA to put data from excel sheet to Server database through network. I create the VBA on the "Workbook_beforeprint" so every time the user print out the sheet, the code will run.
Problem occur when there is no network and excel application become not responding.
I want to make VBA code so that every time excel application become not responding because no network, this code will bypass the excisting VBA and resume to print.
Is anybody can help?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
thank you Sthrncali,

I already put the existing VBA on before_print.
I want to use "not responding" to trigger my VBA to stop, but I dont know the code for "not responding"
any one can help?
 
Upvote 0
I already put the existing VBA on before_print.
I want to use "not responding" to trigger my VBA to stop, but I dont know the code for "not responding"
any one can help?
You probably will want to use one of the On Error statements. Which one? Where to put it? What code to use in conjunction with it? I can't say. Why? Because for some reason you don't think we need to see your code.
 
Upvote 0
Or you need to check for a network connection first. But as Rick says, nothign can be suggested without your code
 
Upvote 0

Forum statistics

Threads
1,215,067
Messages
6,122,949
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top