I have an Array witch Outputs a Transfer Path for a File. Problem Is I don't actually need the Full Path
<TABLE style="WIDTH: 320pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=426 border=0 x:str><COLGROUP><COL style="WIDTH: 320pt; mso-width-source: userset; mso-width-alt: 15579" width=426><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 320pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=426 height=17>D:\Import.xls
I just need the Import.Xls Exported to the worksheet. Anyway I can get Excel to Ignore the Path/Directory and just keep the Filename?
</TD></TR></TBODY></TABLE>
<TABLE style="WIDTH: 320pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=426 border=0 x:str><COLGROUP><COL style="WIDTH: 320pt; mso-width-source: userset; mso-width-alt: 15579" width=426><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 320pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=426 height=17>D:\Import.xls
I just need the Import.Xls Exported to the worksheet. Anyway I can get Excel to Ignore the Path/Directory and just keep the Filename?
</TD></TR></TBODY></TABLE>
Code:
Option Explicit
Public Tran_Path As String
Private Sub cmdTransfer_Click()
Worksheets("Scheme").Range("C11").Value = Tran_Path
Dim fname As String
fname = FileNameOnly(Me.txtImageFolder)
fname = Me.txtTransferFolder & "\" & fname
On Error GoTo FileCopyError
FileCopy Me.txtImageFolder, fname
MsgBox ("Logo Transferred")
SetDefaultTransfer
Unload Me
Exit Sub