Save ComboBox1 & TextBox4 to Sheet roofing B8

toecutter

New Member
Joined
Nov 8, 2005
Messages
2
hi
i am gettin a "complie error" message box with
"invalid or unqualified reference"
new to VBA so any help will be appreciated

thx
toe
Code:
Private Sub CommandButton3_Click() 
     
     'Exit
     
    s = MsgBox("Save roof?", vbYesNo) 
    If s = 6 Then 
         
        s = .Range("B8").End(xlUp).Offset(1, 0).Row 
        Cells(s, 2) = ComboBox1.Value 
        Cells(s, 3) = TextBox4.Value 
    End If 
     
     'ask to save roof material to roofing sheet B8 then B9 then B10 etc and roof quanitiy to column C8 then c9 then C10 etc
     'if yes
     'save roof amount from TextBox4 to roofing sheet B8 then B9 then B10 etc and roof quanitiy to column C8 then c9 then C10 etc
     'then exit
     'if no
     'then exit
    Unload Me 
End Sub
 

Some videos you may like

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,057
Office Version
  1. 365
Platform
  1. Windows
toecutter

Try not to cross post, I've answered you over on OzGrid.

Remember the people on these sites are from all around the world, in many different time zones.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,335
Messages
5,571,608
Members
412,407
Latest member
ElmerCC
Top