0

I keep receiving the method or data member not found when trying to utilize my form.

I've tried rearranging the order of the code, and several other things, but I'm shooting in the dark here. I've made the text that debugger highlights bold.



Private Sub cmdPrint_Click()
    Call PRINT_REPORT
    Call Unprotect
    Call updateforkeith
End Sub


Sub PRINT_REPORT()
Dim EmptySpoot As Integer

    Sheets("ENV-2 FORM").Select
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    Sheets("Calculations").Select
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    Sheets("Database").Unprotect
    Sheets("Calculations").Unprotect
    EmptySpoot = START.**FindSpoot**
    Sheets("Database").Cells(EmptySpoot, 3).Select
    Sheets("Database").Range("C" & r & ":K" & r).Value = Sheets("F0541LOG").Range("C" & i & ":K" & i).Value
    Sheets("Calculations").Select
    Sheets("Calculations").Range("T13:AK13").Select
    Selection.Copy
    EmptySpooot = START.FindSpooot
    Sheets("Database").Select
    Sheets("Database").Cells(EmptySpooot, 12).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Sheets("ENV-2 Form").Select

'-----------------------------------------------------------------------------------

Dim cellvalue As Integer
Dim preseqnum As Integer
Dim currseqnum As Integer
Dim curdate As String
Dim myfilename As String
Dim myfilename2 As String

I get the error in the Sub PRINT_REPORT() section.

Any help would be greatly appreciated. PS. This is my first post here, so if I did something wrong I apologize.

df2nut
  • 1
  • 1
  • Sorry but dumping reams of code without any indication of where the error occurs is not very helpful. Please consider providing a [mcve]. – SJR Jul 31 '19 at 15:44
  • I'm unsure how to highlight the code once entered, and was not sure how much would be relevant to finding the answer. The issue occurs within "Sub Print_Report()" and debugger highlights "FindSpoot" within that section. – df2nut Jul 31 '19 at 16:01
  • It's not reasonable to expect people to wade through all that code to work out what's going on. `EmptySpoot = START.FindSpoot` - what is START? FindSpoot seems to be a function returning a number so this doesn't make sense to me. – SJR Jul 31 '19 at 16:06
  • @SJR I have shortened the code down to where I think only relevant data remains. I made the area where the debugger highlights the error bold. – df2nut Jul 31 '19 at 16:06
  • You should also read this - will help you to shorten that code https://stackoverflow.com/questions/10714251/how-to-avoid-using-select-in-excel-vba – SJR Jul 31 '19 at 16:18

0 Answers0