I have been using this code for a while and it hasn't changed however suddenly it has started opening the vbeditor each time i click the button and highlights the Show
Step 1:
CLICK BUtton3_Click() VB EDITOR OPENS
Sub Button3_Click()
With UserForm1
.StartUpPosition = 0
.Left = Application.Left + (0.5 * Application.Width) - (0.5 * .Width)
.Top = Application.Top + (0.5 * Application.Height) - (0.5 * .Height)
.Show
End With
End Sub
Step 2: UserForm1 opens which as 2 fields in it Stone & Lbs and save button. Code for button below:
Private Sub CommandButton1_Click()
Dim Last_Row As Long
Unload UserForm1
Last_Row = Range("B2").End(xlDown).Offset(1).Row
Range("B2:J2").Copy Range("B" & Last_Row)
Range("B" & Last_Row).Value = Date
Range("C" & Last_Row).Value = StoneBox.Text
Range("D" & Last_Row).Value = PoundsBox.Text
Sheets("WeightPivot").Select
ActiveSheet.PivotTables("PivotTable2").RefreshTable
Sheets("WeightTracker").Select
End Sub
Bookmarks