Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default URGENT!! PLEASE I NEED to finish this by 530 CT

I need to use a file exists statement to determine whether a command button
is visible or not on a spread sheet.

This is what I have come up with so far, but I am not sure of it or how it
actually works...

Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.FileExists("C:\Program Files\Hummingbird\DM
Extensions\Interceptor.exe")
Sheets("TIMESHEET").CMDBTN.Visible = a
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default URGENT!! PLEASE I NEED to finish this by 530 CT

I don't think it does work as shown. Fileexists returns true or false, so
you should not be trying to create an object variable, just a standard
boolean

a = fs.FileExists("C:\Program
Files\Hummingbird\DMExtensions\Interceptor.exe")

You can also do it directly like so

Sheets("TIMESHEET").CMDBTN.Visible = fs.FileExists("C:\Program Files\" & _
"Hummingbird\DMExtensions\Interceptor.exe")

--

HTH

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


"VBA-Beginner" wrote in message
...
I need to use a file exists statement to determine whether a command

button
is visible or not on a spread sheet.

This is what I have come up with so far, but I am not sure of it or how it
actually works...

Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.FileExists("C:\Program Files\Hummingbird\DM
Extensions\Interceptor.exe")
Sheets("TIMESHEET").CMDBTN.Visible = a



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
IME MODE FOR EXCEL 2007 (URGENT URGENT) Stella Wong Excel Discussion (Misc queries) 1 August 23rd 08 11:16 PM
Finish Spreadsheet Trying Hard Excel Discussion (Misc queries) 1 May 22nd 06 10:56 AM
Finish one App before closing?? graham Excel Programming 0 June 24th 04 07:42 PM
Finish this sentence scottnshelly[_28_] Excel Programming 3 April 30th 04 10:20 AM
Need help to finish function.... Dan B Excel Programming 4 October 7th 03 10:06 PM


All times are GMT +1. The time now is 02:58 PM.

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"