Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default WorksheetFunction

I get the runtime error 1004: Unable to get the Find property of the
WorksheetFunction class.
Can any body point that problem?

Dim fileToOpen, dname, fname

fileToOpen = Application _
.GetOpenFilename("Database Files (*.dbf), *.dbf")
fname = Left((Right(fileToOpen, 11)), 7)
If IsError(Application.WorksheetFunction.Find("\", fileToOpen, 4)) = True
Then
dname = Left(fileToOpen, 3)
Else
dname = Left(fileToOpen, Application.WorksheetFunction.Find("\", fileToOpen,
4) - 1)
End If


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default WorksheetFunction

If the Find function is in error and cannot find "\" then the runtime error
occurs, if Find does see a "\" then the function works.
"Mike Fogleman" wrote in message
...
I get the runtime error 1004: Unable to get the Find property of the
WorksheetFunction class.
Can any body point that problem?

Dim fileToOpen, dname, fname

fileToOpen = Application _
.GetOpenFilename("Database Files (*.dbf), *.dbf")
fname = Left((Right(fileToOpen, 11)), 7)
If IsError(Application.WorksheetFunction.Find("\", fileToOpen, 4)) = True
Then
dname = Left(fileToOpen, 3)
Else
dname = Left(fileToOpen, Application.WorksheetFunction.Find("\",

fileToOpen,
4) - 1)
End If




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default WorksheetFunction

Never mind. I had a temp loss of memory on using InStr instead of
wsfunction.Find.
"Mike Fogleman" wrote in message
...
If the Find function is in error and cannot find "\" then the runtime

error
occurs, if Find does see a "\" then the function works.
"Mike Fogleman" wrote in message
...
I get the runtime error 1004: Unable to get the Find property of the
WorksheetFunction class.
Can any body point that problem?

Dim fileToOpen, dname, fname

fileToOpen = Application _
.GetOpenFilename("Database Files (*.dbf), *.dbf")
fname = Left((Right(fileToOpen, 11)), 7)
If IsError(Application.WorksheetFunction.Find("\", fileToOpen, 4)) =

True
Then
dname = Left(fileToOpen, 3)
Else
dname = Left(fileToOpen, Application.WorksheetFunction.Find("\",

fileToOpen,
4) - 1)
End If






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
WorksheetFunction help Ayo Excel Discussion (Misc queries) 2 July 20th 08 10:48 PM
Can't use WorksheetFunction Yossi Excel Discussion (Misc queries) 5 January 25th 06 10:07 PM
WorksheetFunction with VBA Ghislain Marcotte Excel Discussion (Misc queries) 2 February 13th 05 07:08 AM
WorksheetFunction Stuart[_10_] Excel Programming 3 November 13th 03 12:33 AM
worksheetfunction devnext Excel Programming 1 October 29th 03 12:48 PM


All times are GMT +1. The time now is 09:24 AM.

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

About Us

"It's about Microsoft Excel"