Need an example of a simple VB Form

Some videos you may like

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,232
Office Version
  1. 365
Platform
  1. Windows
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.
 

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,454
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:
 

Watch MrExcel Video

Forum statistics

Threads
1,123,358
Messages
5,601,149
Members
414,431
Latest member
JustmemyselfandI

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
Top