Posts by elsuji

    Dear Team,


    I am having two workbook. Source.xlsm and Destination.xlsx.


    In both the work book I am having customer name, Plant model and plant S.No details.


    Once i press's Write Value button from source workbook, I want it should write "Calibration done" on Destination workbook Sheet 2 column K where my customer name, Plant model and plant S.No matching. And this "Calibration Done "


    For example, If customer name, Plant model and plant S.No is matching on row 13 and K13 is blank then K13 it should print "Calibration done"


    Can any one help me for solve this


    I am attaching my file here for your reference.

    Dear Team,


    I am having a code for convert range to PDF when my condition is meet.


    Code is


    Code
         If Cells(r, "C").Value = "LW300FV(ARAI)" And Cells(r, "S").Value >= 400 And Cells(r, "S").Value <= 500 Then
            Worksheets(mySheet).Range("B939:F980").ExportAsFixedFormat _
            Type:=xlTypePDF, _
            FileName:=FileFullPath, _
            Quality:=xlQualityStandard, _
            IncludeDocProperties:=True, _
            IgnorePrintAreas:=False, _
            OpenAfterPublish:=False


    This is working properly.


    But i want to include the range of Worksheets(mySheet).Range("B2:F24") along with the above code.


    I don't know how to do this.


    Can any one help me to solve this issue

    Dear


    I cleared the above said error.

    Modified Code is

    Code
    Dim mySheet As Integer
        Dim TempFilePath As String
        Dim TempFileName As String
     mySheet = sh.Cells(r, "C").Value
     TempFilePath = Environ$("temp") & "\"
    If Cells(r, "E").Value <= 100 Then
    TempFileName = mySheet & " Machine Engine, Transmission, Axle & Hydraulic Oil Service Spares.pdf"
    End If


    But now the error is coming on bellow code

    Code
    'PDF Range And Format
    Dim FileFullPath As String
    FileFullPath = TempFilePath & TempFileName
     If Cells(r, 5).Value <= 100 Then
     Worksheets(mySheet).Range("B5:F30").ExportAsFixedFormat _
     Type:=xlTypePDF, FileName:=FileFullPath, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
    End If


    Pls suggest me

    Dear Danglor,


    I modified the code as per your suggestion. Now Mail is created. New code is


    But i am getting error for mail attachment.


    Code
    'Print '************************************************* ********
     'Turns off screen updating
     Application.ScreenUpdating = False
     'Makes a copy of the active sheet and save it to a temporary file
     Dim wks As Worksheet
     mySheet = sh.Cells(r, "C").Value
     TempFilePath = Environ$("temp") & "\"
    If Cells(r, "E").Value <= 100 Then
    TempFileName = mySheet & " Machine Engine, Transmission, Axle & Hydraulic Oil Service Spares.pdf"
    End If


    Code
    mySheet = sh.Cells(r, "C").Value

    Error is


    Can you please suggest me for clear this error

    Dear Team,


    I am writing code for send Reminder mail to the customer .


    In sheet i am having customer, Machine and machine hours details.


    I am entering the machine hours details on Sheet "Master data", from Column L to S and In Column E to K I am using formula to calculate the values.


    Example,

    For "E10" the formula is =250 - (S10-L10). Where ever I am changing the value either S10 or L10, the calculated value is update on E10.


    If E10 value is less than 100, then I want to trigger mail only the customer who is in the row 10.


    If suppose i am entering the details on row 6 and E6 value is less than 100, then I want to trigger mail only the customer who is in the row 6.


    For that I wrote code. My code is


    Code
    Private Sub Worksheet_Change(ByVal Target As Range)
    
     Dim r As Integer, cl As Integer
     If Not Application.Intersect(Target, Me.Range("L4:S999999")) Is Nothing Then
     r = Target.Row
     cl = Target.Column
     Call Remindermail(r, cl)
     End If
    End Sub


    But when i am checking by changing the value, the mail is not triggering.


    Can any one please help me for solving this issue.


    I attached my file here for your reference

    Dear Roy,


    I modified the code with copy paste the datas to another sheet. Now the listbox header is updating


    New code is



    But only one small problem. When my combobox2 is blank the list box should not display any only. Only it should display value if I type any vales on Combobox2.


    My request is can you please check and correct the code Please

    Dear Team,


    I had created the userform for Add, Update, Delete the customer details. And I am having listbox for display the details. When i am entering any values on Combobox2. it will search the customer name accordingly and display the details on Listbox1.


    I want to update the header for my listbox1. The header range is Sheet "Customer Data" ("A2:H2").


    My code is


    I don't know how to add this headers.


    I am attaching my file here for your reference.


    Please help me to solve this issue

    Then After modified the required fiels on sheet "Inward_Edit" , fo rover write the values and print to pdf, i am using the bellow code.


    On the above code it is not over write the values. It is creating new row only.


    Can you please check and correct the above code for over write the values.

    Dear Roy,


    As per your instruction i created the code.


    I added combobox and writ the bello code for update all the fields from Sheet "Invoice_View" to Sheet "Invoice_Edit".


    Once I select the the Invoice No from combobox all the fields are displaying properly.


    Thanks for your advice