Results 1 to 2 of 2

Thread: VBA Macros 438 runtime error

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    VBA Macros 438 runtime error

    Public filepath As String
    
    Public Sub ConvertJSON()
        UserForm1.Show
        MsgBox (filepath)
         ActiveWorkbook.Queries.Add Name:="IMportJSON", Formula:= _
        "let" & Chr(13) & "" & Chr(10) & "    Source = Json.Document(File.Contents(""" & filepath & """ ))," & Chr(13) & "" & Chr(10) & "    #""Converted to Table"" _
        = Record.ToTable(Source)" & Chr(13) & "" & Chr(10) & "in" & Chr(13) & "" & Chr(10) & "    #""Converted to Table"""     
        ActiveWorkbook.Worksheets.Add
        With ActiveSheet.ListObjects.Add(SourceType:=0, Source:= _
            "OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=ImportJSON;Extended Properties=""""" _


    I guys very new to coding got an error 438 on the line which is in bold, please do help


    Thanks and Regards,
    Supriya
    Last edited by Aussiebear; 11-24-2024 at 12:51 AM.

Posting Permissions

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