Link to home
Start Free TrialLog in
Avatar of STE_IAP
STE_IAP

asked on

create a new worksheet using a button and open the one generated when second click

I've written a procedure creating a new worksheet using a
command button. Question is how shall i write the code so that when i click the command button again, it can open the previous generated worksheet but not another new one?
ASKER CERTIFIED SOLUTION
Avatar of xmetrix
xmetrix

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of STE_IAP
STE_IAP

ASKER

Thank you xmetrix, but my problem is still there.Maybe i didn't make myself clear.The fact is i generate a series of command buttons according to the user-input number. And each button is able to creat a  correspondent worksheet. e.g.button1 creats worksheet1, and button2 creats worksheet2.The problem is how to make it possible that when i click the command buttons out of order, they can still work properly.(for example,i click button3 after clicked button1 can create worksheet3 but not worksheet2.) Of course another demand is once the correspondent worksheet has been created, button will open the worksheet but not create a new one. Please take into consideration that all buttons are assigned to share a macro. Thanks again.
Avatar of STE_IAP

ASKER

xmetrix, my problem is solved. Actually i just need to rename the buttons so that i can trace them. Anyway, thanks.
no problem, sorry about the lack of a second response. i was unable to re-check your status.. anyhow. your welcome