Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
I came to one situation ,
I have written macro to get owner of the files in directory , but when I run this macro from Button , then macro is running fine , but when it got completed it is again opens module. I am not understanding why it is happening .
Attaching my macro, please help
Hello,
For me it is working fine and it did not show macro window. I have tested the code in V.12.10.
This is not related to your question but thought of sharing with you. If user type the file name in small letters then your current code will not execute the below line. You need to use "Ucase" statement here to avoid such scenario.
If UCase(objFSO.GetExtensionName(objFile.name)) = filetype Then
If UCase(objFSO.GetExtensionName(objFile.name)) = UCASE(filetype) Then
gwassenaar can you please help me here.
Any one please help here!!
hello
do you mean that macro editor window is opening after execution ?
it yes, it is beacause there's an error in your macro.
you have to check the code
Yes macro editor window is opening after execution.
But my required output came.
Can you please check my macro attached in original discussion and guide me where I am doing wrong .
Thanks
which macro do you call in your button ?
and how are executed the 1st 5 lignes (they don't belong to a names macro ?)
did you check your variables names ?
when I copy your code in macro editoer, and run Check, I have this error :
ActiveX component can't create object: 'Scripting.FileSystemObject' on line 3
processdocument macro running from the button.
And variables are correct.
So how can I fix this problem, if this is the error.?
I has a problem with admin rights . it's now ok
i have the same problem : process a long time and then reshow the dialog editor
you will have to trace the execution of the macro by adding msgbox instructions to see where the problem is
what i did :
sub processDocument
msgbox "Process will start , Please click OK."
If objFSO.FileExists(OUTPUT_FILE) Then
msgbox "exist"
'you delete if you find it'
msgbox "Trouvé"