Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50103

VBA/Macro to move object in cell, dialog to ask which cell to change

$
0
0
Hey all,

big fan of this forum and have been using it for quite a while, only as a guest of course :p. I have a complicated macro that I want to implement and am having some trouble.

Here is what I have:

I have several things im tracking in which I am using excel for. Specifically, on each row there is one column which has a picture that includes 5 different colored dots in a row. Within that, there is a small rectangle (object) that is around each color; this is used to represent which stage this certain thing is on. as the status changes, I want to move the rectangle either to a forward dot or backwards dot (to represent progression and regression) or the final(completion) dot.

This is what I want to have happen:

Upon clicking a button, I want a dialog box to appear that asks which cell the picture (colored dots) are in. after the data is entered and "ok" is selected, I want a recorded macro to be completed in the selected cell. I have no problem recording the macro and completing the button, but rather having the dialog box pop up and the macro being applied to the specific entered cell.

Some example buttons:

Complete: upon clicking this, a message box asks for the cell number and after clicking on OK the cell that is entered has the rectangle moved to the final color marked completed. I have no problem recording the macro, as that is the easier part, but i'm having trouble having one universal button/macro to do this
Forward: upon clicking this, a message box asks for the cell number and after clicking on OK, the cell that is entered has the rectangle moved forward one color. Once again, no problem recording the macro to move it forward, just having trouble w/ assigning this to all one button and having the box come up to ask for the cell number
Backward: same as above, just moving backwards instead.

I mainly want to do this to avoid having a separate button for each line, thus making the creation of the macro almost the same thing as moving the box itself. Any help would be very appreciated, thanks again for all that you guys do! :)

Viewing all articles
Browse latest Browse all 50103

Trending Articles