+ Reply to Thread
Results 1 to 2 of 2

Error 75

Hybrid View

acuadrosc Error 75 05-11-2015, 11:06 PM
FDibbins Re: Error 75 05-12-2015, 12:02 AM
  1. #1
    Registered User
    Join Date
    05-11-2015
    Location
    Vancouver, Canada
    MS-Off Ver
    2011
    Posts
    1

    Lightbulb Error 75

    Hey,
    I need urgent help! So i am basically doing a macro that does this repeatedly with all the package names on a sheet:

    1. Extracts from the same sheet a package name

    2. Open a file with that package name + ".info" . These are text files with info on them

    3. Gets the info "version" "popularity" etc. from the file and pastes it into the sheet on the same row but different column as the package name

    I dont understand why it doesn't work. Checked everything but I still can't fix it.

    Here I leave the code. Its pretty short.

    CODE:

    Sub Ad_block()
    
    Dim package As String, MyFile As String, text As String, counter As Integer, posName As Integer, textline As String, posDescr As Integer, posPermission As Integer, posType As Integer, posVersion As Integer, posPopularity As Integer
    
    counter = 1
    
    For Each Cell In Range("F2:F11")
    
    counter = counter + 1
    
    package = ActiveCell.Value
    
    
    MyFile = "/Volumes/Andrea_My_Passport/MASTER_THESIS/Analisis_Part_I/POPULAR_APPS/AD_BLOCKING/" & package & ".info"
    
    
    Open MyFile For Input As #1
    
    Do Until EOF(1)
        Line Input #1, textline
        text = text & textline
    Loop
    
    Close #1
    
    posType = InStr(text, "category: ")
    posVersion = InStr(text, "version: ")
    posPopularity = InStr(text, "downloadsCountText: ")
    posPermission = InStr(text, "permissionId: ")
    posDescr = InStr(text, "description: ")
    posName = InStr(text, "title: ")
    
    Range("B" & counter).Value = Mid(text, posType + 11)
    Range("D" & counter).Value = Mid(text, posVersion + 10)
    Range("A" & counter).Value = Mid(text, posPopularity + 21)
    Range("E" & counter).Value = Mid(text, posPermission + 11)
    Range("G" & counter).Value = Mid(text, posType + 14, 100)
    Range("C" & counter).Value = Mid(text, posName + 8)
    
    Next Cell
    
    
    End Sub
    I have written this in Module 1. And ran it from there. Should I move it or put it somewhere else????

    Thanks!!!!
    Last edited by FDibbins; 05-12-2015 at 12:02 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Error 75

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I have added them for you - this time
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Run-tim error -2147467259(80004005): Automation error Unspecidied error
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2014, 12:12 PM
  2. Excel macro (compile error. syntax error.) error
    By salar_younis in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2014, 06:11 AM
  3. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  4. Error 75 File/Path access error, sometimes Error 1004
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-16-2011, 02:35 PM
  5. Error Handling - On Error GoTo doesn't trap error successfully
    By David in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2006, 02:10 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