Name vs FullName

T

Tim Childs

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
 
G

GS

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?
 
D

Dave Peterson

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.





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
 
T

Tim Childs

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 said:
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
 
T

Tim Childs

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 said:
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.





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
 
G

GS

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top