Results 1 to 3 of 3

How to fix runtime error 70 permission denied ?

Threaded View

  1. #1
    Registered User
    Join Date
    01-04-2017
    Location
    Washington
    MS-Off Ver
    365
    Posts
    3

    How to fix runtime error 70 permission denied ?

    I have a proposal log I keep. I started a new one for this year, and added a Userform. However, when Itry to run it I get an error.

    I had the same userform before, just added more columns to the worksheet. I thought maybe it would work.

    I dont' know what a runtime error 70 is exactly, but from what I've read I maybe trying to access too many rows/columns in a range. I have 5 ranges/lists in this userform I'm using. One has about 130 names, the others are quite smaller. Iv'e checked the names.

    See the code below.

    VBAPic.png

    here is the code:

    Private Sub btnSubmit_Click()
    
    Dim Sheet1 As Worksheet
    Dim agency As Range
    Dim state As Range
    Dim EFD As Range
    Dim carrier As Range
    Dim takeover As Range
    
    
    Set ssheet = ThisWorkbook.Sheets("OpenUserform")
    
    nr = ssheet.Cells(Rows.Count, 1).End(xlUp).Row + 1
    
    ssheet.Cells(nr, 1) = CDate(Me.tbdate)
    ssheet.Cells(nr, 3) = Me.CbAgency
    ssheet.Cells(nr, 4) = Me.TbAgentName
    ssheet.Cells(nr, 5) = Me.TbGroupName
    ssheet.Cells(nr, 6) = Me.TbCity
    ssheet.Cells(nr, 7) = Me.CbState
    ssheet.Cells(nr, 8) = Me.TbZipCode
    ssheet.Cells(nr, 9) = Me.TbGroupSIC
    ssheet.Cells(nr, 10) = Me.TbGroupSize
    ssheet.Cells(nr, 11) = Me.CbEFD
    ssheet.Cells(nr, 12) = Me.CbCarrier
    tsheet.Cells(nr, 13) = Me.CbTakeVirgin
    
    If ChkbxSpread.Value = True Then
    ssheet.Cells(nr, 14) = "yes"
    Else
    ssheet.Cells(nr, 14) = ""
    End If
    
    
    If ChkbxDental.Value = True Then
    ssheet.Cells(nr, 15) = "yes"
    Else
    ssheet.Cells(nr, 15) = ""
    End If
    
    If ChkbxVision.Value = True Then
    ssheet.Cells(nr, 16) = "yes"
    Else
    ssheet.Cells(nr, 16) = ""
    End If
    
    If ChkbxLife.Value = True Then
    ssheet.Cells(nr, 17) = "yes"
    Else
    ssheet.Cells(nr, 17) = ""
    End If
    
    If ChkbxSTD.Value = True Then
    ssheet.Cells(nr, 18) = "yes"
    Else
    ssheet.Cells(nr, 18) = ""
    End If
    
    If ChkbxLTD.Value = True Then
    ssheet.Cells(nr, 19) = "yes"
    Else
    ssheet.Cells(nr, 19) = ""
    End If
    
    
    
    
    UserForm1.CbAgency = ""
    UserForm1.TbAgentName = ""
    UserForm1.TbGroupName = ""
    UserForm1.TbCity = ""
    UserForm1.CbState = ""
    UserForm1.TbZipCode = ""
    UserForm1.TbGroupSIC = ""
    UserForm1.TbGroupSize = ""
    UserForm1.CbEFD = ""
    UserForm1.CbCarrier = ""
    UserForm1.CbTakeVirgin = ""
    UserForm1.ChkbxSpread = ""
    UserForm1.ChkDental = ""
    UserForm1.ChkbxVision = ""
    UserForm1.ChkbxLife = ""
    UserForm1.ChkbxSTD = ""
    UserForm1.ChkbxLTD = ""
    
    
    
    
    
    End Sub
    
    Private Sub CmbUserform_Click()
    Unload Me
    
    
    End Sub
    
    Private Sub UserForm_Initialize()
    Me.tbdate = Date
    
    'Fill the combo box'
    For Each cell In [agency]
        Me.CbAgency.AddItem cell
    Next cell
    
    For Each cell In [state]
        Me.CbState.AddItem cell
    Next cell
    
    For Each cell In [EFD]
        Me.CbEFD.AddItem cell
    Next cell
    
    For Each cell In [carrier]
        Me.CbCarrier.AddItem cell
    Next cell
    
    For Each cell In [takover]
        Me.CbTakeVirgin.AddItem cell
    Next cell
    
    
    End Sub


    Any Ideas ??

    Tony
    Last edited by FDibbins; 01-05-2017 at 02:12 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 07-24-2014, 08:59 PM
  2. Runtime Error 70 - Permission Denied - Iframe - IE10 - Excel VBA
    By VBATOexcel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-11-2013, 06:20 PM
  3. Run time error 70 Permission denied.
    By sagar.rajula in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-10-2013, 11:50 AM
  4. Exporting picture. Runtime-Error 70 permission denied. Work-around?
    By Taktiker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2012, 03:57 PM
  5. RunTime 70 Error - Permission Denied
    By ross88guy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-27-2011, 04:46 AM
  6. error 70 - Permission denied
    By MT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2005, 03:06 AM
  7. Run-time error '70': Permission denied
    By Maury Markowitz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-12-2005, 05:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1