View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ricky Pang Ricky Pang is offline
external usenet poster
 
Posts: 53
Default Msg Box on each Loop to Replace text

Hello Experts,
How do you replace each "Total" with the text that is located
immediately below one line below an empty space? And how do you add a
Message Box notification to either accept or override for each Replace
action?

[space]
Payroll
Contract Labour
Employee Benefits
[space]
Total
[space]
Utilities
Utilities - Electric
Utilities - Gas
[space]
Total

The result:
Msgbox "Total" will be replaced by "Payroll". Option to "OK" to accept,
"Cancel" to not do any replacing, "Override" to manually enter a new
text.

"Total" would become "Payroll"
"Total" would become "Utilities"


I've tried using the Replace function but I needed only code would work
as each Replace is different.

Thanks in advance,
Ricky

*** Sent via Developersdex http://www.developersdex.com ***