Hi,
I have a file where I need a macro to search for a value of 0 in the first column and then do one of the following:
(1) Change the value in the active cell in column A where the 0 was found to a value of 9, copy the value from one row up in column B (Offset(-1,1), and paste that value into column B in the same row where the 0 was found (Offset(0,1).
(2) Change the value in the active cell in column A where the 0 was found to a value of 9, copy the value from one row below in column B (Offset(1,1), and paste that value into column B in the same row where the 0 was found (Offset(0,1).
OR
(3) Choose to leave the value in the active cell in column A as 0.
The macro opens a TXT file, moves some columns, and then searches for the value 0 in column A. The basics of that are below. I would like to add some buttons to the TXT file which would allow the user to click on one button to perform the action in #1 above, to click on a second button to perform the action in #2 above, or to click on a third button to leave the value as is, with any of these buttons clicked then looping to the next found instance of 0 after performing the action. Unfortunately, my looping programming skills are weak and I'm not sure at all how to proceed with creating buttons on the fly to do this. Any help you can provide would be greatly appreciated!
Thanks!
Bryan
Please Login or Register to view this content.
Bookmarks