Need an example of a simple VB Form

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Paula

What exactly do you mean?

To create a userform just goto the VBA Editor(ALT+F11) and then Insert>Userform.

You should now have a blank userform which you can add controls/code to.
 
Upvote 0
Hello Paula,
What Norie means is:
(1) Press Alt+F11. (Opens the VB Editor)
(2) From the menu choose Insert & UserForm

You will now have a "blank slate" of a userform to which you can add your controls. - (from the toolbox - If it's not showing choose View & Toolbox)

You can add code to the controls as you go.

UserForms in general are not that hard to learn but there are quite a few little steps to take and options available to you so they can seem rather daunting at first.


And oh yeah. (just for fun) to answer the question your signature quote asks, try something like this in your sheet code module.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns(6)) Is Nothing Then Exit Sub
If Target.Count > 1 Then Exit Sub
If Target.Value > 0 Then
    Application.EnableEvents = False
    With Range("A1")
        hold = .Value
        .Value = -1
        .Copy
        Target.PasteSpecial Paste:=xlValues, Operation:=xlMultiply
        .Value = hold
    End With
    With Application
        .CutCopyMode = False
        .EnableEvents = True
    End With
End If
End Sub
:biggrin:
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,236
Members
448,555
Latest member
RobertJones1986

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top