![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 11
|
Hello,
How do I add a command button to a worksheet (not the tool bar) and have it respond to click events? Also, I want my macro to check a variable (FileName) against all sheet names in workbook and return a value a could right an If statement with to exit if there is a duplicate. How would I go about this? Finally, I would also like to clear all sheets except "Sheets1". Is there an easy way to do this? Thanks a bunch for any insight, Luke Campbell |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2002
Posts: 11
|
please disregard this post. If any of you curious, I used a sheets.count variable then a loop that steps through the sheets by their item numbers, checking the names in each one, and exiting the loop when sheets.count is equal to the worksheet item number.
Luke Campbell |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|