![]() |
mkdir problem
did you declare a variable as Right or create a sub named Right.
-- Regards, Tom Ogilvy "Keivn Green" wrote in message ... When I try to use this command in a macro to create a directory that is the last for digits of the activecell it says " Wrong number of arguments or invalid property assignment." Here is the line in the code.. MkDir ("C:\test\" & RIGHT(ActiveCell.Text, 4)) If the active cell says 12345678 teh it should make a directory called c:\test\5678 Any ideas why this doesnt work? |
mkdir problem
It still sounds like you have RIGHT declared as a variable or as a function
someplace or are using it as a variable (perhaps unintentionally). I would suspect you don't have Option Explicit declared at the top of each module. -- Regards, Tom Ogilvy "Keivn Green" wrote in message ... I had the command in a private sub in a user form. when I put the command in a sub in a module and called that sub then it worked. HMM "Keivn Green" wrote: Strange. it works fine if I change it to LEFT but it wont do RIGHT. What kind of declarations do I need to make if RIGHT is supposed to be a built in procedure? "Tom Ogilvy" wrote: did you declare a variable as Right or create a sub named Right. -- Regards, Tom Ogilvy "Keivn Green" wrote in message ... When I try to use this command in a macro to create a directory that is the last for digits of the activecell it says " Wrong number of arguments or invalid property assignment." Here is the line in the code.. MkDir ("C:\test\" & RIGHT(ActiveCell.Text, 4)) If the active cell says 12345678 teh it should make a directory called c:\test\5678 Any ideas why this doesnt work? |
mkdir problem
Does the function work as "VBA.RIGHT(ActiveCell.Text, 4)" ?
Keivn Green wrote: I had the command in a private sub in a user form. when I put the command in a sub in a module and called that sub then it worked. HMM "Keivn Green" wrote: Strange. it works fine if I change it to LEFT but it wont do RIGHT. What kind of declarations do I need to make if RIGHT is supposed to be a built in procedure? "Tom Ogilvy" wrote: did you declare a variable as Right or create a sub named Right. -- Regards, Tom Ogilvy "Keivn Green" wrote in message ... When I try to use this command in a macro to create a directory that is the last for digits of the activecell it says " Wrong number of arguments or invalid property assignment." Here is the line in the code.. MkDir ("C:\test\" & RIGHT(ActiveCell.Text, 4)) If the active cell says 12345678 teh it should make a directory called c:\test\5678 Any ideas why this doesnt work? |
All times are GMT +1. The time now is 02:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com