jasgot
New Member
- Joined
- Jul 16, 2002
- Messages
- 30
- Office Version
- 365
- 2019
- 2016
- 2013
- 2010
- Platform
- Windows
I use this code, (thanks to this board ) to name and save my file based on user input. How can I yank out any commas that get put into the VB_Trigger, which will become the filename?
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = Range("VB_Trigger").Address Then
ThisFile = Range("VB_Trigger").Value
ActiveWorkbook.SaveAs Filename:="P:SYO Sales DocsQuotesSales" & ThisFile
ActiveWorkbook.Windows(1).Caption = ActiveWorkbook.FullName
End If
End Sub
Thanks!
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = Range("VB_Trigger").Address Then
ThisFile = Range("VB_Trigger").Value
ActiveWorkbook.SaveAs Filename:="P:SYO Sales DocsQuotesSales" & ThisFile
ActiveWorkbook.Windows(1).Caption = ActiveWorkbook.FullName
End If
End Sub
Thanks!