For buttons from the forms toolbar
set cell = Activesheet.Buttons(1).TopLeftCell
for commandbuttons from the control toolbox toolbar
set cell = ActiveSheet.OleObjects("CommandButton1").TopLeftCe ll
On Error Resume Next
mkdir "C:\MyDir2"
mkdir "C:\MyDir2\MySubDir1"
mkdir "C:\MyDir2\MySubDir1\MySubSubDir1"
On Error goto 0
--
Regards,
Tom Ogilvy
"wardides" wrote in message
...
Hi,
I have 2 seerate Queries I am looking for solutions too.
1) Creat a new Directory
I want to create a directory if it dosent't exist.
MkDir allows me to create a directory but only 1 level above what is
there. i.e
if C:\Wages\ then I can create C:\Wages\Jan
but it will not let me create them if C:Wages is not there.
Is there a way to create more then 1 level in the code or do I have to
llop through it.
2) If I have a button on the screen, is there a way to get the cell
reference that it is on. I have about 10 buttons on the screen and
dependant on which one is selected I want to select a certain range of
cells.
Is it possible to know what cell is below a button or link a button to
the cell ?
Thanks
Brian
--
wardides
------------------------------------------------------------------------
wardides's Profile:
http://www.excelforum.com/member.php...o&userid=15022
View this thread: http://www.excelforum.com/showthread...hreadid=266858