Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macros inside macros, and pasting into macro code.


Bearing in mind that I am certainly no more than intermediate level
Excel user, I wish to run a macro in the following way:

A combo box has a linked cell, the user selects from combo box and the
linked cell then contains text. As part of macro (A), I copy this text
into the code of another macro (B), and still in macro (A) I then run
macro (B), reorganising my spreadsheet in the desired fashion. Also in
A, I return macro (B) to its initial state, allowing macro A to run
again.

When I actually try to do this, I either have trouble pasting the
user's choice, the paste is there but inactive in the right click
department, or I get run time errors, with yellow highlighting or red
text in the code of macro A.

The macro code seems to use a "with...end with" reference type routine
which is unfamiliar to me.

I perhaps shouldn't be using a combo box, is there an alternative ? The
nearest analogy to it working I can think of is a user searching on a
website from a list of options. Select a, b, c, or d and the computer
returns stuff relevant to a, b, c, or d.


--
pagelocator
------------------------------------------------------------------------
pagelocator's Profile: http://www.excelforum.com/member.php...o&userid=16506
View this thread: http://www.excelforum.com/showthread...hreadid=320019

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Macros inside macros, and pasting into macro code.

Not clear what you mean by copying text into a macro. Post the code for a
better response.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"pagelocator" wrote in message
...

Bearing in mind that I am certainly no more than intermediate level
Excel user, I wish to run a macro in the following way:

A combo box has a linked cell, the user selects from combo box and the
linked cell then contains text. As part of macro (A), I copy this text
into the code of another macro (B), and still in macro (A) I then run
macro (B), reorganising my spreadsheet in the desired fashion. Also in
A, I return macro (B) to its initial state, allowing macro A to run
again.

When I actually try to do this, I either have trouble pasting the
user's choice, the paste is there but inactive in the right click
department, or I get run time errors, with yellow highlighting or red
text in the code of macro A.

The macro code seems to use a "with...end with" reference type routine
which is unfamiliar to me.

I perhaps shouldn't be using a combo box, is there an alternative ? The
nearest analogy to it working I can think of is a user searching on a
website from a list of options. Select a, b, c, or d and the computer
returns stuff relevant to a, b, c, or d.


--
pagelocator
------------------------------------------------------------------------
pagelocator's Profile:

http://www.excelforum.com/member.php...o&userid=16506
View this thread: http://www.excelforum.com/showthread...hreadid=320019



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
add the macros contained inside a template to an Excel file. Aerojade Excel Discussion (Misc queries) 1 September 30th 08 05:53 AM
Exporting Time Formatted Numbers inside Macros Don Excel Worksheet Functions 4 November 28th 06 07:56 PM
Macros inside Excel Mark Excel Worksheet Functions 4 October 10th 06 03:17 AM
Macro Size Limit / open macros with macros? andycharger[_7_] Excel Programming 6 February 13th 04 02:00 PM
Macros not appearing in the Tools Macro Macros list hglamy[_2_] Excel Programming 5 October 24th 03 09:10 AM


All times are GMT +1. The time now is 07:31 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"