Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Use Parenthesis in Filenames - workaround??

Hi All,

I have got some code that interfaces between an application and excel.

It processes files for a version managing system - I am encountering a
problem when handling file names with parenthesis.


E.g.
If I put the following in a cell

=InterfaceMacro(Process Detail.doc) works


whereas =InterfaceMacro(Process Detail(s).doc) does not work.

I have spoken to the support team for the version managing system and they
say their software can handly parenthesis (I am almost certain they are
correct). This leads me to believe that this is a possible limitation of
vba? Is there anyway I can get round this as I can't change my file names.

Thanks in advance

Andi


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Use Parenthesis in Filenames - workaround??

Andi,

This works for me:

Function InterfaceMacro(FileName As String)
MsgBox FileName
End Function


=InterfaceMacro("Process Detail(s).doc")

=InterfaceMacro("Process Detail.doc")

HTH

"Andibevan" wrote:

Hi All,

I have got some code that interfaces between an application and excel.

It processes files for a version managing system - I am encountering a
problem when handling file names with parenthesis.


E.g.
If I put the following in a cell

=InterfaceMacro(Process Detail.doc) works


whereas =InterfaceMacro(Process Detail(s).doc) does not work.

I have spoken to the support team for the version managing system and they
say their software can handly parenthesis (I am almost certain they are
correct). This leads me to believe that this is a possible limitation of
vba? Is there anyway I can get round this as I can't change my file names.

Thanks in advance

Andi



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Use Parenthesis in Filenames - workaround??

Toppers - I realise your example works - Essentially the macro's I am using
pass the information (filename and path) to an external application.

The external application then processes the file. It works fine except for
files without parenthysis but not with - I was wondering if this could be
attributed to any limitations of VBA?


"Toppers" wrote in message
...
Andi,

This works for me:

Function InterfaceMacro(FileName As String)
MsgBox FileName
End Function


=InterfaceMacro("Process Detail(s).doc")

=InterfaceMacro("Process Detail.doc")

HTH

"Andibevan" wrote:

Hi All,

I have got some code that interfaces between an application and excel.

It processes files for a version managing system - I am encountering a
problem when handling file names with parenthesis.


E.g.
If I put the following in a cell

=InterfaceMacro(Process Detail.doc) works


whereas =InterfaceMacro(Process Detail(s).doc) does not work.

I have spoken to the support team for the version managing system and they
say their software can handly parenthesis (I am almost certain they are
correct). This leads me to believe that this is a possible limitation of
vba? Is there anyway I can get round this as I can't change my file names.

Thanks in advance

Andi





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Use Parenthesis in Filenames - workaround??

Andi,
If I try =InterfaceMacro(Process Details.doc) i.e. not in quotes, I
get an error BUT if I put Procees Detail.doc (no quotation marks) in a cell
e.g B1 and then =InterfaceMacro(B1) it works for this and Procces
Detail(s).doc using my function previously defined.

Don't know if this helps any.

"Andibevan" wrote:

Toppers - I realise your example works - Essentially the macro's I am using
pass the information (filename and path) to an external application.

The external application then processes the file. It works fine except for
files without parenthysis but not with - I was wondering if this could be
attributed to any limitations of VBA?


"Toppers" wrote in message
...
Andi,

This works for me:

Function InterfaceMacro(FileName As String)
MsgBox FileName
End Function


=InterfaceMacro("Process Detail(s).doc")

=InterfaceMacro("Process Detail.doc")

HTH

"Andibevan" wrote:

Hi All,

I have got some code that interfaces between an application and excel.

It processes files for a version managing system - I am encountering a
problem when handling file names with parenthesis.


E.g.
If I put the following in a cell

=InterfaceMacro(Process Detail.doc) works


whereas =InterfaceMacro(Process Detail(s).doc) does not work.

I have spoken to the support team for the version managing system and they
say their software can handly parenthesis (I am almost certain they are
correct). This leads me to believe that this is a possible limitation of
vba? Is there anyway I can get round this as I can't change my file names.

Thanks in advance

Andi






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Use Parenthesis in Filenames - workaround??

Thanks for the suggestion - I may have complicated things by trying to
simplify my example. The File paths are stored in excel and then use the
function to extract the required info about the file:-

e.g.

Cell a1 = "Process Details.doc" Cell b1 = InterfaceMacro(a1)
Cell a2 = "Process Detail(s).doc" cellb1 = InterfaceMacro(b1)

I am essentially grabbing at straws as I know what is causing the error in
my program (parenthesys in the filename) but I am unsure of the root cause.
In my example above row 1 will work, row 2 will not



"Toppers" wrote in message
...
Andi,
If I try =InterfaceMacro(Process Details.doc) i.e. not in quotes, I
get an error BUT if I put Procees Detail.doc (no quotation marks) in a cell
e.g B1 and then =InterfaceMacro(B1) it works for this and Procces
Detail(s).doc using my function previously defined.

Don't know if this helps any.

"Andibevan" wrote:

Toppers - I realise your example works - Essentially the macro's I am

using
pass the information (filename and path) to an external application.

The external application then processes the file. It works fine except

for
files without parenthysis but not with - I was wondering if this could be
attributed to any limitations of VBA?


"Toppers" wrote in message
...
Andi,

This works for me:

Function InterfaceMacro(FileName As String)
MsgBox FileName
End Function


=InterfaceMacro("Process Detail(s).doc")

=InterfaceMacro("Process Detail.doc")

HTH

"Andibevan" wrote:

Hi All,

I have got some code that interfaces between an application and excel.

It processes files for a version managing system - I am encountering a
problem when handling file names with parenthesis.


E.g.
If I put the following in a cell

=InterfaceMacro(Process Detail.doc) works


whereas =InterfaceMacro(Process Detail(s).doc) does not work.

I have spoken to the support team for the version managing system and

they
say their software can handly parenthesis (I am almost certain they are
correct). This leads me to believe that this is a possible limitation of
vba? Is there anyway I can get round this as I can't change my file

names.

Thanks in advance

Andi










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Use Parenthesis in Filenames - workaround??

Can you post the code for InterfaceMacro so we can try see what the problem is?

Using a Subroutine (not Function) I could open a file "Process
Detail(s).xls" OK so it's difficult to see where your problem lies.

"Andibevan" wrote:

Thanks for the suggestion - I may have complicated things by trying to
simplify my example. The File paths are stored in excel and then use the
function to extract the required info about the file:-

e.g.

Cell a1 = "Process Details.doc" Cell b1 = InterfaceMacro(a1)
Cell a2 = "Process Detail(s).doc" cellb1 = InterfaceMacro(b1)

I am essentially grabbing at straws as I know what is causing the error in
my program (parenthesys in the filename) but I am unsure of the root cause.
In my example above row 1 will work, row 2 will not



"Toppers" wrote in message
...
Andi,
If I try =InterfaceMacro(Process Details.doc) i.e. not in quotes, I
get an error BUT if I put Procees Detail.doc (no quotation marks) in a cell
e.g B1 and then =InterfaceMacro(B1) it works for this and Procces
Detail(s).doc using my function previously defined.

Don't know if this helps any.

"Andibevan" wrote:

Toppers - I realise your example works - Essentially the macro's I am

using
pass the information (filename and path) to an external application.

The external application then processes the file. It works fine except

for
files without parenthysis but not with - I was wondering if this could be
attributed to any limitations of VBA?


"Toppers" wrote in message
...
Andi,

This works for me:

Function InterfaceMacro(FileName As String)
MsgBox FileName
End Function


=InterfaceMacro("Process Detail(s).doc")

=InterfaceMacro("Process Detail.doc")

HTH

"Andibevan" wrote:

Hi All,

I have got some code that interfaces between an application and excel.

It processes files for a version managing system - I am encountering a
problem when handling file names with parenthesis.


E.g.
If I put the following in a cell

=InterfaceMacro(Process Detail.doc) works


whereas =InterfaceMacro(Process Detail(s).doc) does not work.

I have spoken to the support team for the version managing system and

they
say their software can handly parenthesis (I am almost certain they are
correct). This leads me to believe that this is a possible limitation of
vba? Is there anyway I can get round this as I can't change my file

names.

Thanks in advance

Andi









  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Use Parenthesis in Filenames - workaround??

I have no idea what InterfaceMacro does, so this is a bit of a shot, but
how about

=InterfaceMacro('Process Detail(s).doc')

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Andibevan" wrote in message
...
Hi All,

I have got some code that interfaces between an application and excel.

It processes files for a version managing system - I am encountering a
problem when handling file names with parenthesis.


E.g.
If I put the following in a cell

=InterfaceMacro(Process Detail.doc) works


whereas =InterfaceMacro(Process Detail(s).doc) does not work.

I have spoken to the support team for the version managing system and they
say their software can handly parenthesis (I am almost certain they are
correct). This leads me to believe that this is a possible limitation of
vba? Is there anyway I can get round this as I can't change my file names.

Thanks in advance

Andi




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MISSING PARENTHESIS Kanmi Excel Worksheet Functions 3 June 26th 09 10:51 PM
parenthesis puiuluipui Excel Discussion (Misc queries) 2 May 27th 08 01:59 PM
Parenthesis problem gmangrove Charts and Charting in Excel 1 December 21st 06 03:11 AM
WHAT ARE PARENTHESIS IN FORMULAS? ann New Users to Excel 2 August 21st 06 10:43 PM
Parenthesis - to use or not to use? John Coleman Excel Programming 4 September 13th 04 02:33 PM


All times are GMT +1. The time now is 03:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"