Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Visual Basic code inversion

Is there a piece of code I can input to a visual basic macro that will enable
it to execute in reverse order? In other words, if line 1 of the code was
Sendkeys "C1" and line 500 or whatever was Sendkeys "{TAB}", I would want it
to run from line 500 to line 1.

This will allow me to fix a small 'glitch' in which the first bloc of code
in a series of macros always runs in reverse order when run with other
macros, when run alone it runs correctly.

Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Visual Basic code inversion

Copy the lines of code and paste into a column in a worksheet.
Number the rows
Sort by the row number descending
Copy back to the macro


Seems an insane way to write macros, but whatever floats your boat.





"Zakynthos" wrote in message
...
Is there a piece of code I can input to a visual basic macro that will
enable
it to execute in reverse order? In other words, if line 1 of the code was
Sendkeys "C1" and line 500 or whatever was Sendkeys "{TAB}", I would want
it
to run from line 500 to line 1.

This will allow me to fix a small 'glitch' in which the first bloc of code
in a series of macros always runs in reverse order when run with other
macros, when run alone it runs correctly.

Many thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Visual Basic code inversion

Many thanks for your advice.

Best wishes

Tony

"Jezebel" wrote:

Copy the lines of code and paste into a column in a worksheet.
Number the rows
Sort by the row number descending
Copy back to the macro


Seems an insane way to write macros, but whatever floats your boat.





"Zakynthos" wrote in message
...
Is there a piece of code I can input to a visual basic macro that will
enable
it to execute in reverse order? In other words, if line 1 of the code was
Sendkeys "C1" and line 500 or whatever was Sendkeys "{TAB}", I would want
it
to run from line 500 to line 1.

This will allow me to fix a small 'glitch' in which the first bloc of code
in a series of macros always runs in reverse order when run with other
macros, when run alone it runs correctly.

Many thanks




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default Visual Basic code inversion

Zakynthos wrote:
Is there a piece of code I can input to a visual basic macro that will enable
it to execute in reverse order? In other words, if line 1 of the code was
Sendkeys "C1" and line 500 or whatever was Sendkeys "{TAB}", I would want it
to run from line 500 to line 1.

This will allow me to fix a small 'glitch' in which the first bloc of code
in a series of macros always runs in reverse order when run with other
macros, when run alone it runs correctly.

Many thanks


-----------------------

Sounds to me like you'd be further ahead to figure out what's causing your
bizzare glitch and fix the intrinsic problem -- rather than patching around it
like this.

Good luck...

Bill
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Visual Basic code inversion

Bill,

Thanks, I've already come to the same conclusion and I'm on the case.

Regards,

Tony

"Bill Martin" wrote:

Zakynthos wrote:
Is there a piece of code I can input to a visual basic macro that will enable
it to execute in reverse order? In other words, if line 1 of the code was
Sendkeys "C1" and line 500 or whatever was Sendkeys "{TAB}", I would want it
to run from line 500 to line 1.

This will allow me to fix a small 'glitch' in which the first bloc of code
in a series of macros always runs in reverse order when run with other
macros, when run alone it runs correctly.

Many thanks


-----------------------

Sounds to me like you'd be further ahead to figure out what's causing your
bizzare glitch and fix the intrinsic problem -- rather than patching around it
like this.

Good luck...

Bill

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
Visual Basic code Pickle Excel Discussion (Misc queries) 1 September 4th 08 03:35 PM
I need a visual basic code....please Rhonda Excel Discussion (Misc queries) 1 March 5th 07 01:18 PM
Visual basic Code GRobertson Excel Programming 3 January 10th 05 02:16 PM
visual basic code Whitey Excel Programming 1 October 26th 04 04:05 PM
Visual Basic Code Robert Couchman Excel Programming 2 February 2nd 04 03:10 PM


All times are GMT +1. The time now is 03:50 PM.

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

About Us

"It's about Microsoft Excel"