Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problems with switch to 2007
I create a xls in 2003. It worked great!
We are now migrating to 2007, On my PC (once again) everything run smoothly. But when others run it they get errors left right and center! I started stepping through my code to try to resolve the problem(s) but am now more confused then ever. For instance, I use the code below to delete a worksheet Dim DstWkb As Workbook Dim DstWks As String Set DstWkb = ThisWorkbook DstWks = "Project Info" DstWkb.Worksheets(DstWks).Delete and it generates an err.number = 9??? and yet it does delete the worksheet?! Why does it work without issue for me and yet generate errors for others, even though it works fine even for them (just reports errors)? Thank you for your guidance, QB |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problems with switch to 2007
try looping thorugh each worksheet and check that the one you want to delete
exists and that the spelling is correct dim ws as worksheet for each ws in thisworkbook.worksheets debug.print ws.name next "QB" wrote in message ... I create a xls in 2003. It worked great! We are now migrating to 2007, On my PC (once again) everything run smoothly. But when others run it they get errors left right and center! I started stepping through my code to try to resolve the problem(s) but am now more confused then ever. For instance, I use the code below to delete a worksheet Dim DstWkb As Workbook Dim DstWks As String Set DstWkb = ThisWorkbook DstWks = "Project Info" DstWkb.Worksheets(DstWks).Delete and it generates an err.number = 9??? and yet it does delete the worksheet?! Why does it work without issue for me and yet generate errors for others, even though it works fine even for them (just reports errors)? Thank you for your guidance, QB |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 - How can I switch the data on vertical and horizontal | Charts and Charting in Excel | |||
What is the VBA for the Excel 2007 "Switch Window" command button? | Excel Programming | |||
Can I switch from Office 2007 layout to the old 2003 layout? | Excel Discussion (Misc queries) | |||
Excel 2007 - Switch vertical and horizontal axis? | Excel Discussion (Misc queries) | |||
In Excel 2007 how to switch off macro with a macro | Excel Programming |