Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Thelma Murray   on Jan 19 In MS Office Category.

  
Question Answered By: Blasa Fischer   on Jan 19

This is the code I wrote.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Dim row As Integer
Dim fname As String
Dim group As String
On Error GoTo error
If Cells(row, 2).Value = "Combo" Then
group = "CM"
Else
group = "RS"
End If

row = Target.row

fname = ThisWorkbook.path & group & "/" & Cells(row, 3).Value & "/" & _
Cells(4, row) & "__" & Cells(5, row) & "__" & Cells(6, row) & ".txt"
FileName = fname
Exit Sub
error: // used for trying to trap  the error (couldn't trap)
Exit Sub
End Sub

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on "Invalid use of Property" mystery Or get search suggestion and latest updates.


Tagged: