Sorted this out. thanks.
Ok This should work. Note you can now have duplicate values in cells B1 and B2. [img alt_text='' description='']http://vbaf1.com/q/wp-content/uploads/2018/02/InsertRowafterdups_1.jpg[/img] [Code]...
Thanks, that's much appreciated, however once I've run the code it says the subscript is out of range - even if I...
Caveat: Cells B1 and B2 Must not be duplicates. Note! Change sheet name ("Sheet1") to your sheet name. [img alt_text=''...
This seemed to work for me. Make sure "SheetName" is "SheetName" and not "WorksheetName". I also added a Goto line1...
SORTED! [code] Private Sub AnotherSheet() Dim sDate As Date Dim tDate As Date Dim PayDay As Date Dim DueDate...
This answer was most helpful. Thank you
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)
Private Sub CommandButton1_Click()
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)
Please share using the share button above.
If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.
Found the answer useful and wants to credit the user, then vote the answer (vote up).