Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have just built a spreadsheet that includes about 32 macros and they don't
always seem to function correctly. I essentially have built a game where when an icon is clicked a value located in another worksheet will appear. Thus, I have built a number of macros that are assigned to various icons, a value appears. The macros use apply a formula, e.g. "=," to locate the value on the other worksheet. Some macros work fine all of the time while others produce odd results or require double clicks of the icon to produce the desired value). I am hoping to identify whether these problems are correctable through debugging the programming or if MSExcel macros are inherently unstable or prone to errors. Additionally, is this apparent instability associated with the total number of macros I am attempting to use in this workbook (there are a lot). The responses I receive here will aid me in approaching a resolution to the problem, e.g. spend the day debugging (assuming the system will remain stable once it is debugged) or accept the fact that if I insist on using so many macros that the system will never function correctly. Additionally, I am including the text of one macro that works correctly (Sub Box1) and another that does not (Sub Box5). They essentially do the same tasks, but for different icons. They were both created using the "record macro" tool. Given that the macro text pattern is different in each example, I suspect the "record macro" tool simply makes errors in recognizing actions. Assuming the MSExcel macro system is generally stable once macros are correctly written, I am contemplating just copying and pasting the successful macro (with appropiate changes) into all of the flawed macro routines. However, if the system is unstable then doing this would just be a waste of time. Thanks. Sub Box1() ' ' Box1 Macro ' Macro recorded 2/24/2006 by Nat Pope ' ' Range("C8").Select ActiveCell.FormulaR1C1 = "=Sheet1!R[-4]C[10]" Sheets("Sheet1").Select Range("L4").Select ActiveCell.FormulaR1C1 = "0" Sheets("Sheet2").Select Range("C8").Select End Sub Sub Box5() ' ' Box5 Macro ' Macro recorded 2/25/2006 by Nat Pope ' ' ActiveCell.FormulaR1C1 = "=Sheet1!R[-8]C[10]" Sheets("Sheet1").Select Range("L8").Select ActiveCell.FormulaR1C1 = "0" Sheets("Sheet2").Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel instability - screen scrolls to end of sheet on right hand side | Excel Discussion (Misc queries) | |||
anyone experiencing graphics instability in Excel 2007 | Excel Discussion (Misc queries) | |||
Large Charts Cause Instability | Charts and Charting in Excel | |||
Excel 2007 instability | Excel Discussion (Misc queries) | |||
VBA project instability | Excel Programming |