Posts by ashu1990

    Re: Adding \ (Backslash) symbol in VBA code promblem


    try this


    Code
    Sub test()
    Dim obj As Object
    Dim path As String
    Set obj = CreateObject("Shell.Application").browseforfolder(0, "Please Select Folder", 0)
    On Error GoTo error_trap:
    path = obj.self.path & "\"
    MsgBox path
    error_trap:
    End Sub

    Re: Compile Error:automation error in vba


    yes i did but didn't stated any missing reference
    i checked the activeX trust settings and its set as usual nothing's changed.
    Is there any possibility of an administrator to lock down or block the activex codes from running?
    or is there any thing i have missed i have done an excel acess automation where i have used activex 2.8 library
    the error focus on the declaration of the connection
    dim con as adodb.connection
    but as when i started to type a new delaraction it stooped on ADODB after that the .connection (child) didn't appeared is there any problem?

    Re: Compile Error:automation error in vba


    Quote from cytop;669537

    The machine actually running the code does not have some component(s) installed.


    That's all that can be said based on the information you have supplied.


    Thanks for the reply cytop..


    I checked the refrences and did not found any missing refrences can you tell me what are the components that went missing or give me and idea where i should bang my head on..

    Hi guys,


    i am stuck with an error where the macro work fines into my pc but tried to test into client pc it gave me an error
    Compile Error:automation error as i am running the macro inside a VM player (eg:- critix type) which are used here.


    nothing works as soon as i press the run button the error pops up.


    i tried searching it on others forums as well as this but didn't got the answer
    can any one state me the reason for this error..

    Re: Path not found


    i didnt found any error in your code its working fine for me
    check if you missed C: or D: in your path or create a script for choosing the path
    i have made some changes in the code hope this helps

    Re: ComboBox's linked loop Crash HELP!!!


    didnt understod your requirement well..
    try to assign a variable to check the count of loop and use exit sub
    eg:-



    put this in start of the code and see if it does the trick

    Re: Userform Listbox Rowsource dependent on Textbox value


    try this

    Code
    Set ran = ActiveSheet.UsedRange
     
      ran.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range("A1:B2"), CopyToRange:=Range("I1"), Unique:=False


    it will give you the required data into existing sheet but you have to adjust the criteria as per your request and the CopyToRange where you want the data to get pasted

    Re: Sum till blank cell - Continue till next blank cell


    try this

    Code
    Sub test()
        Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(3, 4), _
            Replace:=True, PageBreaks:=False, SummaryBelowData:=True
        ActiveSheet.UsedRange.Select
        Selection.Copy
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Application.CutCopyMode = False
        Selection.RemoveSubtotal
    End Sub

    Re: Copy Last used cell in column "D" from multiple closed workbooks to an open work


    try this

    Re: Can't click hyperlink in locked cells.


    can you let me know that the answer provided to you firstly solved your issue?


    the error is due to no cells range .Cells(A, "AV") ---> this is not the proper way


    cells(0,"AV") or someother values inside the bracket


    try something like this easy and works for me every time

    Code
    tool.Worksheets("TRB Database").range("Enter Range here").Formula = "=HYPERLINK("" & URLText & "", " & CStr(ThisWorkbook.Worksheets("Design Calculator, Q").Cells(21, "P").Value) & ")"