LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Split ActiveCell.Value and delete element if.........

The active cell holds file(s) path(s) separated by ";".
I'm splitting the content of the cell, if it is not a valid file name I'd
like to delete that element. Is the deletion part doable? THANKS IN ADVANCE

When I use GetOpenFilename the extension of .doc files become .docx.
I'm removing the "x" to avoid confusing the user but when I run
CBool(Len(Dir(FileName) it returns FALSE obviously because a character is
missing. Any suggestions???


This is what I have.



Dim x As Variant
Dim i As Long
x = Split(ActiveCell, ";")

For i = 0 To UBound(x)
If CBool(Len(Dir(x(i)))) = False Then
MsgBox x(i) & "isn't a valid file" 'I WANT TO DELETE INSTEAD OF
MsgBox
End If
Next i



 
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
delete element is collection Gary Keramidas Excel Programming 3 November 14th 07 10:48 PM
Window Split and activecell scott d Excel Programming 3 January 30th 07 06:57 PM
Delete String Element John[_88_] Excel Programming 3 February 8th 05 08:26 PM
Delete rows with common element Anauna Excel Programming 3 December 21st 04 04:19 PM
Delete the row where the activecell is located with VBA Tim Zych[_2_] Excel Programming 0 July 19th 03 03:57 AM


All times are GMT +1. The time now is 08:43 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"