Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default 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" wrote in message
...
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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vba code runs...need spaces ........ Wanna Learn Excel Discussion (Misc queries) 2 January 20th 09 12:44 PM
Code runs in 2002 but not in 97!? Big Chris[_39_] Excel Programming 4 August 25th 05 12:22 PM
Code slows down after a few runs Diverse Computing[_2_] Excel Programming 2 July 21st 05 04:08 AM
Code runs every other time Mike Waldron Excel Programming 1 September 27th 03 03:54 PM
How to keep from going dizzy when my code runs TBA[_2_] Excel Programming 3 September 23rd 03 11:33 PM


All times are GMT +1. The time now is 05:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"