endri
07-16-2016, 04:40 AM
Hi,
i am newbie in excel scripting and i need help for creating a command button.
I need the button to save the selected row in a specified text file.
Then when i select another row, i want the button to save the newly selected row to the same text file by rewriting the existing one.
If possible i need the button to save(rewrite) the file automatically without asking confirmation.
I found the following code which works but it saves the entire workbook, and asks confirmation. I can't figure out how to replace "ActiveWorkbook." with active selection
"ActiveWorkbook.SaveAs Filename:="C:\filepath\example.txt", _
FileFormat:=xlUnicodeText, CreateBackup:=False"
Any help will be very appreciated!!!
Thank you!
i am newbie in excel scripting and i need help for creating a command button.
I need the button to save the selected row in a specified text file.
Then when i select another row, i want the button to save the newly selected row to the same text file by rewriting the existing one.
If possible i need the button to save(rewrite) the file automatically without asking confirmation.
I found the following code which works but it saves the entire workbook, and asks confirmation. I can't figure out how to replace "ActiveWorkbook." with active selection
"ActiveWorkbook.SaveAs Filename:="C:\filepath\example.txt", _
FileFormat:=xlUnicodeText, CreateBackup:=False"
Any help will be very appreciated!!!
Thank you!