Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all, i am trying to get the file name and then trim off the ".xls"
from the end. myFileName = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) This then give me an error as per the subject line. Please could somebody give me some help. thanks. Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Have you checked if there are any MISSING references in the VBIDE,
ToolsReferences. -- HTH Bob Phillips "Les Stout" wrote in message ... Hi all, i am trying to get the file name and then trim off the ".xls" from the end. myFileName = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) This then give me an error as per the subject line. Please could somebody give me some help. thanks. Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, i am sorry i do not understand what is meant by the references in
the VBIDE, ToolsReferences. I understand that i must go to the tools and then references, but do not know what to look for as there are so many that are not flagged ?? Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You look for the words MISSING in all caps. It would be a selected
reference so it would be in the group that are checkmarked at the top. As far as the code goes - from the immediate window: myFileName = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) ? myFileName American Express1 gives the correct answer. I assume myFilename is dim'd as String or Variant or not declared. -- Regards, Tom Ogilvy "Les Stout" wrote in message ... Hi, i am sorry i do not understand what is meant by the references in the VBIDE, ToolsReferences. I understand that i must go to the tools and then references, but do not know what to look for as there are so many that are not flagged ?? Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom, i checked and only the following are checked:
Visual Basic for Applications Microsoft 10.0 Object Library, & Microsoft Visual Basic for applications 5.3 If i change the "left" to "right" it works ?? but the left does not, even in my immediate window !! i do not understand ? Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
References are specific to the activeproject. Make sure the problematic
workbook is selected in the Project Manager in the VBE (it is highlighted). then do tools=References. Also, look in the object browser and search for left in the VBA library. if nothing helps, try the kludge myFileName = VBA.Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) -- Regards, Tom Ogilvy "Les Stout" wrote in message ... Hi Tom, i checked and only the following are checked: Visual Basic for Applications Microsoft 10.0 Object Library, & Microsoft Visual Basic for applications 5.3 If i change the "left" to "right" it works ?? but the left does not, even in my immediate window !! i do not understand ? Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom, will try in the morning, 21:25 here and time to go home.
cheers Thanks Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Nested IF's with Logical Arguments - Doing something wrong here | Excel Discussion (Misc queries) | |||
Nested IF's with Logical Arguments - Doing something wrong here | Excel Discussion (Misc queries) | |||
Nested IF's with Logical Arguments - Doing something wrong her | Excel Discussion (Misc queries) | |||
Wrong number of Arguments or Invalid property assignment | Excel Programming |