I have inserted several command buttons on an Excel 2003 worksheet. Each button executes a separate VBA macro. I would like one of these macros to make one of the command buttons invisible. The target button (called "Update") will become visible again if the user modifies any data in the worksheet.
Everything works fine, except that the target button remains visible - although inactive - after the code is executed. If I minimize the Excel application window and then maximize it again, the Update button vanishes, as it should. This suggests that the screen must be refreshed after the macro is executed in order to make the button invisible to the user.
I have seen other posts related to this problem (http://www.excelforum.com/excel-prog...ml#post2188184), but I'm having difficulty implementing the solution myself.
If I add the following line to my macro:
I get the following error box:Please Login or Register to view this content.
It seems that the Repaint method is not available to me in Excel VBA. Have I misunderstood how to use this method? I'm not using a userform, but just working with command buttons directly in the Excel spreadsheet. Thanks in advance for any help.Compiling error. Could not find the method or data member.
Bookmarks