+ Reply to Thread
Results 1 to 7 of 7

Copy active cell in before doubleclick script

  1. #1
    Registered User
    Join Date
    03-28-2013
    Location
    CZECH
    MS-Off Ver
    Excel 2007
    Posts
    17

    Copy active cell in before doubleclick script

    Hi.
    Can someone help me with my two problems?
    I have a list of part numbers in column A - Id like to make a macro in range A using it the internet explorer will be opened. So im using the "draft" before double click. Now I am in the IE where I want to be. Its simple site with search box and button + some options for searching.

    1st problem: I need to copy the value of the cell during doubleclick even - then, when the IE opens, I can paste part number into search box. when I make cell.value.copy or put in clipboard, it doesnt work - maybe because it activate the cell after doubleclick event. So Id like to have the value of the cell in clipboard, when IE window opens.

    2nd problem: Automatically insert this value into searchbox - like the url was google - so insert in box and search. So I need to know how to find searchbox and search button in source html code, then join it with excel eg: Searchbox= myrange.value or paste or sendkeys ^c...

    Hope I described it understandable.
    Thanks in advance

  2. #2
    Forum Contributor
    Join Date
    09-24-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: Copy active cell in before doubleclick script

    Run this code first because the copy to clipboard code will not work with out it being run..
    Please Login or Register  to view this content.
    Try this code for the copy to clipboard after you run the above code..

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-28-2013
    Location
    CZECH
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Copy active cell in before doubleclick script

    Hi.
    Thanks for reply.
    Question1: The Makeform sub I should run like module or where and when - before "before doubleclick" there is just:

    If VYKR.Value = True Then ' if toggle is on
    On Error GoTo Start ' if window dont exist
    AppActivate ("Workplace: MORA AEROSPACE : Vyhledávání - řízené výkresy/změnovky - Windows Internet Explorer")

    Exit Sub
    Start:
    Dim ie As Object
    Set ie = CreateObject("INTERNETEXPLORER.APPLICATION")
    ie.NAVIGATE "URL"
    Do While ie.Busy
    Application.Wait DateAdd("s", 1, Now)
    Loop
    ie.Visible = True
    Else
    ....
    Question2: What is the form for? On the end of sub it is deleted...

  4. #4
    Forum Contributor
    Join Date
    09-24-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: Copy active cell in before doubleclick script

    The makeform sub is to make the object instance so that the copy to clip board sub will run correctly. you can put the make form sub in a module in your personal.xlsb file that gets loaded when excel starts. you can also make a tool bar button for the makeform sub. the copy to clip board sub is put into the sheet module of your active workbook.

  5. #5
    Registered User
    Join Date
    03-28-2013
    Location
    CZECH
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Copy active cell in before doubleclick script

    Now I quite understand it (dont understand how you find it out) and BTW it works...
    Thanks

    Now trying to copy this value to the searchbox automatically in opened window, but cannot find the searchbox in the sourcecode. Can you help me with this please, im not familiar with html code and translation into VB to comunicate.
    *.mht file:
    Wo.zip

  6. #6
    Forum Contributor
    Join Date
    09-24-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: Copy active cell in before doubleclick script

    HTML code i have dabbled into a little but this question is a bit over my head.. sorry.. maybe someone can answer this question for you..

  7. #7
    Registered User
    Join Date
    03-28-2013
    Location
    CZECH
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Copy active cell in before doubleclick script

    OK anyway thanks a lot.
    I am another step closer (recorded IE macro):
    URL GOTO=file:///C:/Users/Mimoa/Desktop/Workplace%20MORA%20AEROSPACE%20%20Vyhled%E1v%E1n%ED%20-%20ř%EDzen%E9%20v%FDkresy-změnovky.mht ' THE SITE I JUMP WITH DOUBLECLICK IN EXCEL, SIMULTANEOUSLY I HAVE PART NUMBER IN CLIPBOARD
    TAG POS=1 TYPE=INPUT:TEXT FORM=ID:searchForm ATTR=NAME:prop_typestring_123_editable_document_like CONTENT=abcdef ' IS WHERE I NEED SOMETHING LIKE: = PASTE OR PASTE CLIPBOARD OR SENDKEYS or clipboard value
    TAG POS=1 TYPE=BUTTON ATTR=NAME:Vyhledat ' JUST CLICK ON BUTTON SEARCH - OPTIONAL

    So now how to say excel macro to paste clipboard in this searchform?
    Thanks in advance, searching, trying...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA Codes to DoubleClick a cell
    By JYY in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-28-2013, 01:21 AM
  2. When doubleclick a cell take action
    By vin1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-01-2011, 05:00 PM
  3. copy on doubleclick event
    By vixus in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-10-2010, 11:57 PM
  4. [SOLVED] Copy from active sheet and paste into new sheet using info from cell in active
    By Ingve in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2006, 06:00 PM
  5. What does DoubleClick on a cell do?
    By surotkin in forum Excel General
    Replies: 2
    Last Post: 06-15-2005, 08:51 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1