Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Re : Excel Chemistry Before and After
Re : Excel VBA-Chemistry Before and After ......
1. Enter an Excel worksheet and the VBA module thereof. 2. The VBA used to run OK ; and then, it began to behave as follows ...... 3. When the WorkBook opens (in the first instant), the VBA would print the following statements on the screen, namely, A. MsgBox "Sub ComBox_Change() ...... Exit Sub." B. With ButtonTopLeftCell .Columns.AutoFit MsgBox "Cell Breadth = " & .ColumnWidth End With 4. However, on subsequent run, it would print statement-A only. Statement-B is ignored 5. In fact, it means that it would print character-string exclusively. MsgBox with variable is ignored. 6. Please comment and share your experience. 7. This is Excel-2000. 8. Regards. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel Chemistry Before and After
Code gets printed on the screen ? Where ?
I think you'll need to provide more information + code. Tim wrote in message ... Re : Excel VBA-Chemistry Before and After ...... 1. Enter an Excel worksheet and the VBA module thereof. 2. The VBA used to run OK ; and then, it began to behave as follows ...... 3. When the WorkBook opens (in the first instant), the VBA would print the following statements on the screen, namely, A. MsgBox "Sub ComBox_Change() ...... Exit Sub." B. With ButtonTopLeftCell .Columns.AutoFit MsgBox "Cell Breadth = " & .ColumnWidth End With 4. However, on subsequent run, it would print statement-A only. Statement-B is ignored 5. In fact, it means that it would print character-string exclusively. MsgBox with variable is ignored. 6. Please comment and share your experience. 7. This is Excel-2000. 8. Regards. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel Chemistry Before and After
Mr. Tim Williams,
When the code runs, MsgBox "Sub ComBox_Change() ...... Exit Sub." would show the typical dialog box on-the-screen. And then, there is nothing and just nothing to show for, With ButtonTopLeftCell .Columns.AutoFit MsgBox "Cell Breadth = " & .ColumnWidth End With (Although it was there when the workbook opened in the first jiffy). If everything (subsequently) would just run like that first jiffy, there should be no more problem. But, that's not the situation altogether. Admittedly, the query case has been simplified a bit (to avoid over- clouding the case unnecessarily). Regards. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel Chemistry Before and After
I think you may be oversimplifying.
It's not clear for example what is triggering any of the code you show ? If the second message does not show then either that code is not being called, or somewhere you have an error handler which is catching something silently. Tim wrote in message ... Mr. Tim Williams, When the code runs, MsgBox "Sub ComBox_Change() ...... Exit Sub." would show the typical dialog box on-the-screen. And then, there is nothing and just nothing to show for, With ButtonTopLeftCell .Columns.AutoFit MsgBox "Cell Breadth = " & .ColumnWidth End With (Although it was there when the workbook opened in the first jiffy). If everything (subsequently) would just run like that first jiffy, there should be no more problem. But, that's not the situation altogether. Admittedly, the query case has been simplified a bit (to avoid over- clouding the case unnecessarily). Regards. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|