• Ask a Question
Insert Image Size must be less than < 5MB.
    Ask a Question
    More answer You can create 5 answer(s).
      Ask a Poll
      Top Contributor

      Loop Macro


      I am using the following macro for generating XML file, however I want to run this in loop and generate multiple files, each file should have an assignee id(see client id) picked from a sheet and populate the appropriate numbers in the Input Sheet (see import)

      Loop MacroClient ID

      Loop MacroAmount

      Loop MacroImport

      Private Sub CommandButton1_Click()
      Dim iCntr
      Dim strFile_Path As String
      Dim Filename As String
      'Change cell reference accordingly
      Filename = Sheets("Input").Range("C6") & "" & Sheets("Input").Range("C7") & "" & Sheets("Input").Range("C9") & ""
      strFile_Path = "C:\Temp\CCH\" & Filename & "" & Format(Now(), "dd-MMM-yyyy h-m-s") & ".xml"
      Open strFile_Path For Output As #1
      For iCntr = 1 To 1110
      Print #1, Sheets("Import").Range("D" & iCntr)
      Next iCntr
      Close #1
      End Sub
      Asked by pranab79in on February 26, 2018 in VBA: Macros.
      • Need help on this question. Please take a look at this on priority.

        on March 16, 2018.
      Add comment
      0 Answers