1

Just curious.

This is a more theoretical (related to Excel VBA) question. Rather than a trying to solve a particular problem. I have learnt that Excel has ready, cut, copy and other modes. I am just wondering what mode it is when a msgbox is displayed.

If it is not in ready mode, what mode is it in? (Could it be cut, copy mode or something else?)

Community
  • 1
  • 1
chinghp
  • 117
  • 2
  • 13

1 Answers1

1

I am just wondering what mode it is when a msgbox is displayed.

The mode is called "Click the Damn Button" Mode!!! :D

Jokes apart, it is the Ready Mode. The best way to test it is to launch a Msgbox and then check the status bar.

Ready mode indicates a general state.

enter image description here

EDIT: One thing I would like to mention. If you Copy a cell say using CTRL + C and then immediately show a Msgbox then the mode changes to xlCopy. Similarly if you Cut a cell using say CTRL + X and then immediately show a Msgbox then the mode changes to xlCut. See this example

Sub Sample()
    Select Case Application.CutCopyMode
        Case Is = False: MsgBox "Not in Cut or Copy mode"
        Case Is = xlCopy: MsgBox "In Copy mode"
        Case Is = xlCut: MsgBox "In Cut mode"
    End Select
End Sub

enter image description here

Siddharth Rout
  • 147,039
  • 17
  • 206
  • 250