Posts by Pacheco

    Is it possible to use Vba/Excel to control the mouse click?


    I need to activate a differente program window and then use the mouse to activate a bottom, executing a command of that software.


    E.g.: I activate the software window, the mouse position is set to X=100 e Y=100, the macro click the mouse left button


    Thx


    Pacheco

    Re: Using Windows search with shell command


    I could try to use a alternative "Search Software", but then I will need to install it in all the computers.... and I didn't have any luck finding the official "Windows Search Program".... =(


    Any ideas?

    Re: Using Windows search with shell command


    I still believe that the "Search Window Software" is a better solution, 'cause it already have all I need without extra work. All I'll need to do is to informe the corect parameter to the software and my search will have a nice apresentation and a result that I can trust.


    But I am open to other ideas ;)


    Pacheco

    Re: Using Windows search with shell command


    Hi,


    There isn't a file with a name "search.exe" =(, and that's my problem.


    E.g: to open Windows Explorer -> retval=shell("explorer.exe c:\temp",1)


    What I need is to use a search function that allow me to search in a specific folder and its subfolders, using a specific criterion. Then, I need a table with the results and a easy option to open any of these files (the found ones)


    For this, I believe the Search Program from Windows is a very good solution and all I need is to know his run command (e.g: START -> RUN -> something.exe => open the Search Program) and the sequency of it's parameters (e.g: retval=shell("something.exe [parameter1] [parameter2] ... [parameter n]",1))


    Pacheco

    Hi all,


    I need to open and to configure the Window search software [ START -> SEARCH].


    e.g: retval= shell("search.exe [all files and directories] [path: ...] [name: *.dwg] etc,1)


    My problem:
    1) I can't find the search software. I know explorer.exe, calc.exe, winword.exe, excel.exe, cmd (prompt), etc... but not this one =(


    2) How I enter the parameters to configure the search software (like the e.g.)



    For now, I am using the explorer.exe software to open a specific directory, but I had found that some files aren't in the right place, so I need to make a search from the most likely directory and it's subfolders, using a specific criterion (like "*.dwg" or "teste*.*") and then show the results to the user, so he/she can select which file to open.


    thx,


    Pacheco

    Re: Test and open a directory with explorer using vba


    Yes, I need to open a specific directory (e.g: c:\temp), but I also need to be able to determine if that directory exists (e.g: c:\temp\test -> error)


    I tried to use the shell command:


    Dim RetVal
    RetVal = Shell("C:\windows\explorer c:\temp", 1)


    But in that way I can´t determine if that works or not.


    Thx for any hint,


    Pacheco

    Hi all,


    I just downloaded from Microsoft a program to make help files (.chm) using html: Html Help Workshop 1.3


    I tried to link my help file (e.g help.chm) with a botton, but can't make this work! I would appreciate any tips to solve this problem.


    My command bars are make using vba, e.g:
    Set cmdBar = CommandBars.Add(Name:="MnP", _
    Position:=msoBarTop)
    Set btn = cmdBar.Controls.Add(Type:=msoControlButton)
    With btn
    .Enabled = True
    .Style = msoButtonIconAndCaption
    .Caption = "&EE"
    .FaceId = 7
    .OnAction = "bcEst"
    End With


    there are two options: .helpfilecontextid and .helpfile to use to link a help file

    I could do that, but them I would have a big problem. Imagine that the sheet has too many info (a large file), copy and paste could take time and my priority is do all very quickly.


    The easier e quickly away I can think is do what I asked for, but I don't know how =( . If I could just copy/paste/modify the code of a sheet, that would solve my 2 problems: this one and timing.


    I would appreciate any input on this matter.


    Thx
    Pacheco

    Hi all.


    That is my problem: I need to copy a text into the code of a worksheet.


    E.g: 1) Creating a new sheet
    2) Copying some text (from anywhere, like a text file or a variable)
    3) Paste that info as the code of the new sheet


    Why? I need to be able to create a new sheet that have events codes, but I need to do that automaticaly. Also, I need to be able to update that code without have to open every single file, only the base (where my code will be save, again, like a text file ou a base workbook) and, every time that other files will be open, they will copy the code again.


    Thx a lot!


    Pacheco

    I have one workbook with a huge database (10 column with 50.000 rows), and the first column have increase numbers (50.000, 50.001, 50.005, .... , 120.000)


    In another workbook / worksheet, I need to retrieve data from that database using a criteria like the code from column A


    e.g:
    55000
    65000
    76808
    103000
    ...


    So, using the same code, I need to locate the row at the database and copy some columns like B, D and F.


    I know that I can use range.find(...) and range(result...).value = range(database...).value, Autofilter, etc


    I need to know what is the fast/best way to do that, because I have sometimes to take data to 1000 row and it is taking too much time


    thx!

    When we install programs, there is a bar with some kind of counter that indicates the % left to finish the work (10% done, 20% done, etc)


    What is the best way to do that using vba for excel? I need to execute several operations in many rowns, and I need to indicate to my user how many rows are left, etc


    thx all