Posts by mjschukas

    Re: .find method on a fitlered range


    basically, i have a "master" list (update infrequently) in one sheet...


    i have a promo list in another sheet (frequent updates-doesn't contain all master info.)...


    so, i use the .find from the items in the promo list to search the "master" and retain info. to add to the promo...
    (works well without the filtering)


    make sense?


    thank you.

    the .find method is working well (code below), but when i add a fitler to the search range (below, column aa), i seem to get "funky" results (works 90% plus of the time and then i'll get a wrong return, or i have to search a second time to get the correct results...).


    -i've wondered if sometimes the previous search doesn't get cleared?-i'm still testing...


    ???


    Code
    '...
     For Each c In Worksheets("PT").Range("d8:D" & LastRowPC).Cells 'brand
       ' strSearch = c.Value & c.Offset(0, 1).Value            
     strSearch = usfP.cmbMU & usfP.cmdState & c.Value & c.Offset(0, 1).Value
       Set aCell = oshtsp.Range("aa1:aa" & LastRowsp).Find(What:=strSearch, LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False, After:=oshtsp.Range("aa" & LastRowsp))
     '...


    thank you.

    Re: user form goes "blank" inside its borders


    in further testing, i still loose the contents of the userform (seems the longer the code runs-based on a fitler, etc.


    here's the code i added:
    '...


    thank you

    sometimes when i run code under a command button on a pop-up user form, the contents of the userform go "blank"
    (i.e., border stays on, so you can see that the form is still there, but the contents are all "white"-you cannot read/see any of the content...


    ?what could be done to prevent this from happening (presently, i just have the mouse cursur displaying while code is running?


    thank you.

    i'm using the .find method against a range on another worksheet (works well)...


    but when i filter the range first (e.g., only give me the country of USA), my results are not 100% correct (sometimes i have to run the .find code a second time and then it returns correctly...???)...


    ?does this make sense?
    --maybe i should not be using the .find method against a filtered range?
    (i have tried running the find against the entire worksheet and then against a dynamic range name-adusting after the filter)


    ???


    thank you.

    i've been using the following lines of code successfully in 2003, we began porting to 2007 and i get an error on the .saveas replace method and function line...?


    Code
    Set fs = CreateObject("Scripting.filesystemobject")
            If fs.fileexists(FileName) = False Then
                Atmt.SaveAsFile FileName
                Set objexcel = CreateObject("Excel.Application")
                Set objws = objexcel.Workbooks.Open(FileName)
                      'error next line...
                objws.SaveAs Replace(FileName, ".xls", ".txt"), xlTextWindows
                i = i + 1
                Item.Delete
            End If


    (n.b., error on the line: objws.SaveAs replace...)


    n.b., this code runs under a form in outlook 2007, but i'm thinking that i'm invoking Excel in the code...


    ???


    thank you.

    Re: Compress Worksheet File...


    here's my code:



    thanks...