ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Name vs FullName (https://www.excelbanter.com/excel-programming/444455-name-vs-fullname.html)

Tim Childs[_4_]

Name vs FullName
 
Hi

I have discovered that when I download a CSV file, that always contains a
"]", from the work financial system, the previous Application Event
trapping of the form Wb.Name includes the "]" character no longer traps the
the file even though the actual filename still contains a "]". The Wb.Name
now converts the square bracket "]"to a round bracket ")".

What is really odd is that if I use the Wb.FullName property the "]" is
included in the string Wb.FullName and so I can trap the "]" that way.

My question is why is the Wb.Name property no longer properly reflects the
actual filename (any more).

Any help most welcome.

Tim


GS[_2_]

Name vs FullName
 
Tim Childs formulated on Friday :
Hi

I have discovered that when I download a CSV file, that always contains a
"]", from the work financial system, the previous Application Event trapping
of the form Wb.Name includes the "]" character no longer traps the the file
even though the actual filename still contains a "]". The Wb.Name now
converts the square bracket "]"to a round bracket ")".

What is really odd is that if I use the Wb.FullName property the "]" is
included in the string Wb.FullName and so I can trap the "]" that way.

My question is why is the Wb.Name property no longer properly reflects the
actual filename (any more).

Any help most welcome.

Tim


Are you importing the file directly from the url or saving it to disk
before import?

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc



Dave Peterson[_2_]

Name vs FullName
 
Excel doesn't like those square brackets in filenames. Heck, it doesn't like
those square brackets in sheet names, either.

If you write a formula that refers to a range in another worksheet in a
different workbook, you'll see that excel wraps the filename in those square
brackets.

I do my best to remove them from the filename before doing anything within excel.

And I don't like the # sign in filenames either (if you're fixing names). That
character in the filename will break hyperlinks to that file.





On 04/15/2011 15:25, Tim Childs wrote:
Hi

I have discovered that when I download a CSV file, that always contains a "]",
from the work financial system, the previous Application Event trapping of the
form Wb.Name includes the "]" character no longer traps the the file even though
the actual filename still contains a "]". The Wb.Name now converts the square
bracket "]"to a round bracket ")".

What is really odd is that if I use the Wb.FullName property the "]" is included
in the string Wb.FullName and so I can trap the "]" that way.

My question is why is the Wb.Name property no longer properly reflects the
actual filename (any more).

Any help most welcome.

Tim


--
Dave Peterson

Tim Childs[_4_]

Name vs FullName
 
hi Garry

I'm just downloading it into Excel itself i.e. not formally saving it. In
practice, the file seems to exist in one of Microsoft's launch areas

Tim


"GS" wrote in message ...
Tim Childs formulated on Friday :
Hi

I have discovered that when I download a CSV file, that always contains a
"]", from the work financial system, the previous Application Event
trapping of the form Wb.Name includes the "]" character no longer traps
the the file even though the actual filename still contains a "]". The
Wb.Name now converts the square bracket "]"to a round bracket ")".

What is really odd is that if I use the Wb.FullName property the "]" is
included in the string Wb.FullName and so I can trap the "]" that way.

My question is why is the Wb.Name property no longer properly reflects
the actual filename (any more).

Any help most welcome.

Tim


Are you importing the file directly from the url or saving it to disk
before import?

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc




Tim Childs[_4_]

Name vs FullName
 
Hi Dave

as you say Excel does not normally permit those square brackets

any ideas on the perverse behaviour of Name / FullName

many thanks for the response

Tim

"Dave Peterson" wrote in message
...
Excel doesn't like those square brackets in filenames. Heck, it doesn't
like those square brackets in sheet names, either.

If you write a formula that refers to a range in another worksheet in a
different workbook, you'll see that excel wraps the filename in those
square brackets.

I do my best to remove them from the filename before doing anything within
excel.

And I don't like the # sign in filenames either (if you're fixing names).
That character in the filename will break hyperlinks to that file.





On 04/15/2011 15:25, Tim Childs wrote:
Hi

I have discovered that when I download a CSV file, that always contains a
"]",
from the work financial system, the previous Application Event trapping
of the
form Wb.Name includes the "]" character no longer traps the the file even
though
the actual filename still contains a "]". The Wb.Name now converts the
square
bracket "]"to a round bracket ")".

What is really odd is that if I use the Wb.FullName property the "]" is
included
in the string Wb.FullName and so I can trap the "]" that way.

My question is why is the Wb.Name property no longer properly reflects
the
actual filename (any more).

Any help most welcome.

Tim


--
Dave Peterson



GS[_2_]

Name vs FullName
 
Tim Childs expressed precisely :
I'm just downloading it into Excel itself i.e. not formally saving it. In
practice, the file seems to exist in one of Microsoft's launch areas

Tim


What I get when I downoad a CSV from a website is the file opens in a
new book and the filename in the title bar is...

Filename.CSV [Read Only]

...which requires me to use 'SaveAs' if I want to save it. These are the
only square brackets I see, and which are put there by Excel.

Mind you, I'm downloading the file into Excel via a hyperlink on a
worksheet.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc




All times are GMT +1. The time now is 10:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com