Posts by elsuji

    Dear Dave,


    The bellow is my code


    how can i modify the code as per above said conditions

    Dear Dave,


    I done small modification on your code


    Code
    1. If c.Offset(, 9) = "" Then

    I have one doubt.


    I printed the "Calibration done on " & Date on column K.


    If the same data's repeated again on another row. Then that time how this code will work.


    I want to print "Calibration done on " & Date again on newly entered row only.

    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.

    Files

    • Destination.xlsx

      (10.63 kB, downloaded 5 times, last: )
    • Source.xlsm

      (13.52 kB, downloaded 6 times, last: )

    Dear Team,


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


    Code is


    Code
    1. If Cells(r, "C").Value = "LW300FV(ARAI)" And Cells(r, "S").Value >= 400 And Cells(r, "S").Value <= 500 Then
    2. Worksheets(mySheet).Range("B939:F980").ExportAsFixedFormat _
    3. Type:=xlTypePDF, _
    4. FileName:=FileFullPath, _
    5. Quality:=xlQualityStandard, _
    6. IncludeDocProperties:=True, _
    7. IgnorePrintAreas:=False, _
    8. 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
    1. Dim mySheet As Integer
    2. Dim TempFilePath As String
    3. Dim TempFileName As String
    4. mySheet = sh.Cells(r, "C").Value
    5. TempFilePath = Environ$("temp") & "\"
    6. If Cells(r, "E").Value <= 100 Then
    7. TempFileName = mySheet & " Machine Engine, Transmission, Axle & Hydraulic Oil Service Spares.pdf"
    8. End If


    But now the error is coming on bellow code

    Code
    1. 'PDF Range And Format
    2. Dim FileFullPath As String
    3. FileFullPath = TempFilePath & TempFileName
    4. If Cells(r, 5).Value <= 100 Then
    5. Worksheets(mySheet).Range("B5:F30").ExportAsFixedFormat _
    6. Type:=xlTypePDF, FileName:=FileFullPath, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
    7. 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
    1. 'Print '************************************************* ********
    2. 'Turns off screen updating
    3. Application.ScreenUpdating = False
    4. 'Makes a copy of the active sheet and save it to a temporary file
    5. Dim wks As Worksheet
    6. mySheet = sh.Cells(r, "C").Value
    7. TempFilePath = Environ$("temp") & "\"
    8. If Cells(r, "E").Value <= 100 Then
    9. TempFileName = mySheet & " Machine Engine, Transmission, Axle & Hydraulic Oil Service Spares.pdf"
    10. End If


    Code
    1. 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
    1. Private Sub Worksheet_Change(ByVal Target As Range)
    2. Dim r As Integer, cl As Integer
    3. If Not Application.Intersect(Target, Me.Range("L4:S999999")) Is Nothing Then
    4. r = Target.Row
    5. cl = Target.Column
    6. Call Remindermail(r, cl)
    7. End If
    8. 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.