123FakeSt
IS-IT--Management
- Aug 4, 2003
- 182
Hi, i have a VBA excel macro that opens a large fixed width ascii file in cells a:a. I need to replace the first 9 characters with text that the user will supply depending on the first letter of the text. The user will enter replacements for all of the possible starting characters.
The basic logic is ....
Dim SearchRange as Range, userpstring as String
Set SearchRange = Range("Sheet2!a:a")
userpstring = InputBox("Enter P String") ' There are 4 possibilities
'If the first letter is 'p' pull the first 9 characters, replace with userpstring & any spaces needed so character 10 is still character 10.
Thanks, i have already learned so much from these threads!
Rusty
The basic logic is ....
Dim SearchRange as Range, userpstring as String
Set SearchRange = Range("Sheet2!a:a")
userpstring = InputBox("Enter P String") ' There are 4 possibilities
'If the first letter is 'p' pull the first 9 characters, replace with userpstring & any spaces needed so character 10 is still character 10.
Thanks, i have already learned so much from these threads!
Rusty