Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this set of code in a macro that I am using to gather our
salespeople's customer information. This works great until I get to some of our newer salespeople that don't have any customers yet. It changes every month how many and if a salesperson has any customers. What I need for it to do is to run the application and if their name isn't found go on to the next line of code. Is there a way that I can do this? So far it just brings me an error message and then I'm stuck and have to run all the rest manually. Can I put in some extra code or something to suppress the error message and keep on running? The code that I am currently using is below. Keep in mind we have over 100 employess so this is cumbersome doing it manually. Sheets("W Zone").Select Range("I228").Select ActiveCell.FormulaR1C1 = "aaaa" Range("I228").Select Application.Run "'Branch Productivity Report.xls'! GetCustomerRecord" Sheets("NE Zone").Select Range("I81").Select ActiveCell.FormulaR1C1 = "bbbb" Range("I81").Select Application.Run "'Branch Productivity Report.xls'! GetCustomerRecord" Range("I130").Select ActiveCell.FormulaR1C1 = "cccc" Application.Run "'Branch Productivity Report.xls'! GetCustomerRecord" ActiveWorkbook.Save Thank you in advance for any ideas that you have |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Slow code when used as VBA code instead of macro (copying visible columns) | Excel Programming | |||
Can I use code/macro to change code/macro in an existing file? | Excel Programming | |||
Macro code to remove a macro after it executes | Excel Programming | |||
read macro code by vb code | Excel Programming | |||
do anybody have a sample code for executing excel macro from vb code?<eom | Excel Programming |