Posts by ranjith_12

    Application.ScreenUpdating = False

    Dim FileToOpen As Variant
    Dim OpenBook As Workbook, shAllBranch As Worksheet
    Dim r As Long

    r = Range("A6").End(xlDown).Row + 1

    FileToOpen = Application.GetOpenFilename(Title:="Browse for your File & Import Range", Filefilter:="Excel Files (*.xls*),*xls*")
    ' FileToOpen = Application.GetOpenFilename(Filefilter:="Excel Files (*.xlsx), *.xlsx", Title:="Select Workbook to Import", MultiSelect:=True)

    If FileToOpen <> False Then
    Set ActiveSheet = Application.Workbooks.Open(FileToOpen)
    ActiveSheet.Sheets(1).Range("A1:L1").Copy
    ActiveWorkbook.Worksheets("Sheet1").Range("A" & r).PasteSpecial xlPasteValues
    End If
    Application.ScreenUpdating = True

    End Sub


    Afterwards need to short based on coulmn A in the master sheet

    Sub Import_BOM_DATA()

    Application.ScreenUpdating = False

    Dim FileToOpen As Variant
    Dim OpenBook As Workbook, shAllBranch As Worksheet
    Dim r As Long

    r = Range("A6").End(xlDown).Row + 1

    FileToOpen = Application.GetOpenFilename(Title:="Browse for your File & Import Range", Filefilter:="Excel Files (*.xls*),*xls*")
    ' FileToOpen = Application.GetOpenFilename(Filefilter:="Excel Files (*.xlsx), *.xlsx", Title:="Select Workbook to Import", MultiSelect:=True)

    If FileToOpen <> False Then
    Set ActiveSheet = Application.Workbooks.Open(FileToOpen)
    ActiveSheet.Sheets(1).Range("A1:L1").Copy
    ActiveWorkbook.Worksheets("Sheet1").Range("A" & r).PasteSpecial xlPasteValues
    End If
    Application.ScreenUpdating = True


    End Sub



    Afterwards need to short based on coulmn A

    if i directly mention conversion number . Getting " Kill sPath as error".


    if i run your code . Getting error argument already specified (Highlighted 51 red)

    Code
    1. FileFormat:=51


    My badness output file extension is not recognized, So getting Error and also output file have module code


    Getting Compile error: Named argument already specified and multiple warning error


    Code
    1. targetfile = Range(cell_target_File).Value + "Upload"
    2. ThisWorkbook.SaveAs Filename:=targetfile, FileFormat:=xlOpenXMLWorkbook
    3. ActiveWorkbook.SaveAs ActiveWorkbook.Name, (".xls"), FileFormat:=56

    i have master macro template (.xlsm) help to transferring data from "A file to master template. Input "A" maybe allow two different format ( .Xlsx Or .xls) , then saveas file output file (B) should be files as (.xls) . Master template i protected pwd code in VB properties. Like to remove all code in Output file (B). How can i unprotected VB project using code to delete Module codes ? . Getting Error if master file is protected not allowing me to run removing codes. If i unprotected master template by manually , it allows to delete code in output file.


    i am trying to delete Module1 and Thisworkbook macro in saveas file.but macro is not deleting the saveas file