Consulting

Results 1 to 5 of 5

Thread: Automate Click, Save Close

  1. #1

    Automate Click, Save Close

    Hi guys!

    I have hundred of raw data file (excel) which i have to create a report. However, i have to click first a specific field to get the data. I would like to ask how can i automate this. I saved my file in one folder.

    what i need is.
    -loop through a large number of files (all in one directory)
    -double click specific cell (K10, same in all files)
    -save file and close

    i think this could be done in macro but im still newbie in excel macro. Any help would be appreciated! thanks!

    *before the sheet that i need is display cell "K10" should be clicked. I dont know since i'm new in using excel. maybe it acts as a link. however, those are just the things that i need. loop,double click,save and close. )

  2. #2
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    What is the purpose of double clicking? By doing so, you put the cell in edit mode typically. Automating that is not what one would typically want as it requires a user action for each before it can proceed.

    A single click is easily done. Of course we would need to know the sheet name or sheet number to select the correct K10.

    Some programmers run code by a Selection event for a cell on a specific sheet. To activate such a macro, one needs to select some other cell as on open, that cell may already be selected. That would happen in your case as you saved the file after "doubleclicking".

  3. #3
    hi kenneth, thanks for the reply.

    Let's put that the sheet name is "TABLE". I need the double click cell "K10" in sheet Table to display another sheet named sheet 1. I dont know if its activated by macro or its just a link. however, i tried to record macro and here's what i got.
    [VBA]Sub autoCLICK()
    Range("K10").Select
    Selection.ShowDetail = True
    End Sub[/VBA]

    i would like to upload the file but i can't cause it contains confidential data from our company.

  4. #4
    anyone?

  5. #5
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    You should understand your code if you are to manage it. If you right click the sheet's tab, select View Code. You should see something like:
    [VBA]Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)

    End Sub[/VBA]
    Between the Sub lines is what we should look at.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •