+ Reply to Thread
Results 1 to 4 of 4

Code only runs once

Hybrid View

  1. #1
    Kent
    Guest

    Code only runs once

    I have code which take ACTIVECELL.SELECT and SELECTION.TEXTTOCOLUMNS to have
    an text string pasted to columns. When the code had run once, it does not
    work any longer. Can anybody give some help, so I have the code running also
    after several inputs ?
    Thanks

  2. #2
    Niek Otten
    Guest

    Re: Code only runs once

    What is your code?
    What do you mean by "does not work any longer"? how do you notice that?

    --
    Kind regards,

    Niek Otten

    "Kent" <[email protected]> wrote in message
    news:[email protected]...
    >I have code which take ACTIVECELL.SELECT and SELECTION.TEXTTOCOLUMNS to
    >have
    > an text string pasted to columns. When the code had run once, it does not
    > work any longer. Can anybody give some help, so I have the code running
    > also
    > after several inputs ?
    > Thanks




  3. #3
    Kent
    Guest

    Re: Code only runs once

    The code is:
    ActiveCell.Value = Str1
    ActiveCell.Select
    Selection.TextToColumns Destination:=ActiveCell.Offset(0, 1),
    DataType:=xlDelimited, _
    TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=True, _
    Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
    :=Array(1, 1), TrailingMinusNumbers:=True

    where "Str1" is a string coming by COM1.
    As mentioned the procedure runs once. If I restart Excel it works again. Is
    there some variable in the memory which shoulf be removed? And how?



    "Niek Otten" skrev:

    > What is your code?
    > What do you mean by "does not work any longer"? how do you notice that?
    >
    > --
    > Kind regards,
    >
    > Niek Otten
    >
    > "Kent" <[email protected]> wrote in message
    > news:[email protected]...
    > >I have code which take ACTIVECELL.SELECT and SELECTION.TEXTTOCOLUMNS to
    > >have
    > > an text string pasted to columns. When the code had run once, it does not
    > > work any longer. Can anybody give some help, so I have the code running
    > > also
    > > after several inputs ?
    > > Thanks

    >
    >
    >


  4. #4
    Niek Otten
    Guest

    Re: Code only runs once

    Hi Kent,

    Difficult and, to be honest, a bit frustrating too, if one tries to help and
    gets no information.
    This isn't your code, this is part of your code. You didn't answer my
    question about how you know the code doesn't work.
    Please give all info and tell us what you do, what your data is, what you
    think should happen and what happens instead.

    --
    Kind regards,

    Niek Otten

    "Kent" <[email protected]> wrote in message
    news:[email protected]...
    > The code is:
    > ActiveCell.Value = Str1
    > ActiveCell.Select
    > Selection.TextToColumns Destination:=ActiveCell.Offset(0, 1),
    > DataType:=xlDelimited, _
    > TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True,
    > Tab:=True, _
    > Semicolon:=False, Comma:=False, Space:=True, Other:=False,
    > FieldInfo _
    > :=Array(1, 1), TrailingMinusNumbers:=True
    >
    > where "Str1" is a string coming by COM1.
    > As mentioned the procedure runs once. If I restart Excel it works again.
    > Is
    > there some variable in the memory which shoulf be removed? And how?
    >
    >
    >
    > "Niek Otten" skrev:
    >
    >> What is your code?
    >> What do you mean by "does not work any longer"? how do you notice that?
    >>
    >> --
    >> Kind regards,
    >>
    >> Niek Otten
    >>
    >> "Kent" <[email protected]> wrote in message
    >> news:[email protected]...
    >> >I have code which take ACTIVECELL.SELECT and SELECTION.TEXTTOCOLUMNS to
    >> >have
    >> > an text string pasted to columns. When the code had run once, it does
    >> > not
    >> > work any longer. Can anybody give some help, so I have the code running
    >> > also
    >> > after several inputs ?
    >> > Thanks

    >>
    >>
    >>




+ 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