I was wondering if anyone can help me create a macro that exports text to notepad and also removes any consecutive exclamation points. I am creating a configuration generator for different networking equipment and depending on what is selected in other rows I could have quite a few exclamation points in a row that I would like taken out and turned into only 1 exclamation point when these cells are copied and pasted into notepad. Is this do-able? I am new to using macros and I tried the macro creator but it just always deleted the same row as I did when I recorded the macro. I just need it when it sees "exclamation 'enter' exclamation" it should turn it into just exclamation until there is only a single exclamation point in-between lines of code instead of multiple lines of exclamation points. I am currently running the below macro.
Sub AddConnectionTOexisting()
'The range that contains the values
Range("A1:A33").Copy
'Start Notepad And let it recieve focus
Shell "notepad.exe", vbNormalFocus
'Send the keys CTRL+V To Notepad (i.e the window that has focus)
SendKeys "^V"
End Sub
Sample of what my problem looks like when pasted to notepad:
mode t1
clock adaptive
!
!
!
!
!
!
!
!
!
!
!
!
apply configuration
exit
If anyone has any ideas on how this could be done I would really appreciate it. Thanks.
Bookmarks