Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's a much cleaner way to write that.
It didn't occur to me to structure it that way. Thanks When I implemented that everything worked great again But it wasn't the err.clear statement that was the problem I don't think I had that statement in the original code I just made an oops and deleted it when I was cleaning it up for the post I'm not going to worry about it anymore now though as long as it works. Thinks for the help guys! Really appreciate it. :) This was the actual ' On Error GoTo ErrorNAN ' For Each ticket In Range(Range(Cells(CASES, LAST), Cells(CASES, LAST).End(xlDown)), Range(Cells(CASES, HEADER), Cells(CASES, HEADER).End(xlToRight))).Rows ' With ticket ' .columns(NATL).Value = CDbl(.columns(NATL).Value) ' .columns(CNUM).Value = CDbl(.columns(CNUM).Value) ' .columns(LTIM).Value = "=SUM(IF(RC[" & ZONE - LTIM & "]=""AST"",TIME(2,0,0),0),IF(RC[" & ZONE - LTIM & "]=""EST"",TIME(1,0,0),0),IF(RC[" & ZONE - LTIM & "]=""MST"",-TIME(1,0,0),0),IF(RC[" & ZONE - LTIM & "]=""PST"",-TIME(2,0,0),0),IF(RC[" & ZONE - LTIM & "]=""AKST"",-TIME(3,0,0),0),IF(RC[" & ZONE - LTIM & "]=""HST"",-TIME(4,0,0),0),NOW())" ' ActiveSheet.Hyperlinks.Add Anchor:=.columns(CNUM), address:="http://ps.sei-it.net/psc/ps/EMPLOYEE/CRM/c/CALLCENTER.RC_CASE_SW.GBL?Page=RC_CASE_SW&Action=U &BUSINESS_UNIT=MCDON&CASE_ID=" & .columns(CNUM).Value ' End With ' If False Then 'ErrorNAN: ' ticket.Delete ' separations(1, LABL) = "Cashless" ' separations(1, GPID) = Array("MEGAPATH", "WAYPORT", "HUGHES") ' separations(1, SUMM) = Array("cashless", "connectivity", "wayport") ' separations(2, LABL) = "IST" ' separations(2, GPID) = Array("IST") ' err.clear ' End If ' Next ' On Error GoTo 0 This is the rework: ' On Error resume next ' For Each ticket In Range(Range(Cells(CASES, LAST), Cells(CASES, LAST).End(xlDown)), Range(Cells(CASES, HEADER), Cells(CASES, HEADER).End(xlToRight))).Rows ' With ticket ' .columns(NATL).Value = CDbl(.columns(NATL).Value) ' .columns(CNUM).Value = CDbl(.columns(CNUM).Value) ' .columns(LTIM).Value = "=SUM(IF(RC[" & ZONE - LTIM & "]=""AST"",TIME(2,0,0),0),IF(RC[" & ZONE - LTIM & "]=""EST"",TIME(1,0,0),0),IF(RC[" & ZONE - LTIM & "]=""MST"",-TIME(1,0,0),0),IF(RC[" & ZONE - LTIM & "]=""PST"",-TIME(2,0,0),0),IF(RC[" & ZONE - LTIM & "]=""AKST"",-TIME(3,0,0),0),IF(RC[" & ZONE - LTIM & "]=""HST"",-TIME(4,0,0),0),NOW())" ' ActiveSheet.Hyperlinks.Add Anchor:=.columns(CNUM), address:="http://ps.sei-it.net/psc/ps/EMPLOYEE/CRM/c/CALLCENTER.RC_CASE_SW.GBL?Page=RC_CASE_SW&Action=U &BUSINESS_UNIT=MCDON&CASE_ID=" & .columns(CNUM).Value ' ' If Err < 0 Then ' .Delete ' Err.Clear ' ticket.Delete ' separations(1, LABL) = "Cashless" ' separations(1, GPID) = Array("MEGAPATH", "WAYPORT", "HUGHES") ' separations(1, SUMM) = Array("cashless", "connectivity", "wayport") ' separations(2, LABL) = "IST" ' separations(2, GPID) = Array("IST") ' End If ' End With ' Next ' On Error GoTo 0 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
control shift highlighting does not work | Setting up and Configuration of Excel | |||
Control + C wont work | Excel Discussion (Misc queries) | |||
Error control no work :( | Excel Programming | |||
Cannot get Common Dialog Control to work | Excel Programming | |||
Error 50290: Error writing to Worksheet while using an ActiveX Control | Excel Programming |