+ Reply to Thread
Results 1 to 8 of 8

incomplete code

  1. #1
    Registered User
    Join Date
    05-12-2005
    Posts
    68

    Question incomplete code

    I have this code I've been working on and it dosn't work

    Please Login or Register  to view this content.
    and I want it to loop until there is nothing in the selected box

  2. #2
    Forum Contributor
    Join Date
    11-09-2004
    Posts
    451
    Do Until ""
    Application.OnKey "F2"
    Application.OnKey "HOME"
    Application.OnKey "Del"
    Application.OnKey "Enter"
    ActiveCell.Offset(0, 1).Select
    Loop


    what you are trying to do with do until "" (what is the condition)

    what exactly are you trying to do inside do loop

  3. #3
    Registered User
    Join Date
    05-12-2005
    Posts
    68
    I have a list of names I'm using this on and I want it to do that process until there is nothing in the selected box (it's sopose to go down one each loop)

  4. #4
    Registered User
    Join Date
    05-12-2005
    Posts
    68
    We are trying to go through a undefined range of cells and do some editing on them until there are blanks in the process, which at that time the procedure should stop. Do you know how to do this?

  5. #5
    Forum Contributor
    Join Date
    11-09-2004
    Posts
    451
    I made a minor change, I am not sure what you are trying to do using Application.OnKey "{F2}"....


    Sub MakeHyperlink()
    Range("B8").Select

    Do Until ActiveCell.Value = ""
    Application.OnKey "{F2}"
    Application.OnKey "{HOME}"
    Application.OnKey "{Del}"
    Application.OnKey "{Enter}"
    ActiveCell.Offset(0, 1).Select
    Loop

    End Sub

  6. #6
    Registered User
    Join Date
    05-12-2005
    Posts
    68
    what I'm trying to do is simulate key pressing. Like the computer presses the key for me. I've updated the code realizing what OnKey does, but it doesn't work.


    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    11-09-2004
    Posts
    451
    I am not sure if this is what you looking for

    Sub MakeHyperlink()
    Range("B8").Select

    Do Until ActiveCell.Value = ""
    SendKeys "{F2}"
    SendKeys "{HOME}"

    SendKeys "{Del}"

    SendKeys "{Enter}"
    ActiveCell.Offset(1, 0).Select
    Loop

    End Sub

  8. #8
    Dave Peterson
    Guest

    Re: incomplete code

    There might be better ways of accomplishing the same thing without using
    sendkeys.

    If you post a few examples of what's in those cells (and what should be
    deleted), it might be easier to follow.

    (and you want a hyperlink when you're done, too? mailto://, I bet???)

    tim64 wrote:
    >
    > I have a list of names I'm using this on and I want it to do that
    > process until there is nothing in the selected box (it's sopose to go
    > down one each loop)
    >
    > --
    > tim64
    > ------------------------------------------------------------------------
    > tim64's Profile: http://www.excelforum.com/member.php...o&userid=23295
    > View this thread: http://www.excelforum.com/showthread...hreadid=380569


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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