+ Reply to Thread
Results 1 to 3 of 3

two macros in one keyboard shortcut; macro lunch allowed only in one TAP

  1. #1
    Registered User
    Join Date
    07-01-2010
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2007, Excel 2010 beta
    Posts
    13

    two macros in one keyboard shortcut; macro lunch allowed only in one TAP

    Hello my name is Betinka (female) and I am from Poland.

    I want to ask You about some help with VBA code in my excel sheet.
    I had some task to do and my IT specialist had helped me but right now he is on holiday and I cant reach him and I need to solve this problem at least on firday.
    _________________________________________________

    Please open attached excel file for better understanding my problem.
    There are two tabs:
    1)POMIESZCZENIA
    2)ZESTAWIENIE

    on first of them (POMIESZCZENIA) there are source data.
    on second one (ZESTAWIENIE) I would like to have results of VBA program.

    There are already two MACROs written
    1)NAWIEW
    2)WYWIEW

    Now I will explain what that MACROs do and what else I want from that MACROs.
    1) Macro NAWIEW takes "expressions" from TAP POMIESZCZENIA from column X and write down in TAP ZESTAWIENIE "expressions" which can not repeat.
    It means that if in column X there is:
    apple
    banana
    banana
    banana
    orange

    than in results there will be:
    apple
    orange
    banana

    2)Macro WYWIEW do almost the same but it takes source data from different column (AC) and places results in different place.

    This is very good to me because at the beggining I just wanted to have NOT REPEATED LIST from elements which can repeat.

    Right now I would like to make it a little bit better and "user error resistant"

    This is what I would like to add to that VBA code but I dont have any idea how to do it:
    1) I would like to have a keyboard shortcut that will lunch both of that macros(NAWIEW+WYWIEW) - rihgt now i have to lunch every macro separatelly.
    2) I would like that macros to work only in TAP ZESTAWIENIE. It means that if somebody will try to run that macro on TAP ZESTAWIENIE that VBA program will say "this is not possible - go to TAP ZESTAWIENIE"
    3)As you see right now the program also treat "empty cell" like NON REPEATED EXPRESSION but I dont really want to have it. If there is some empty cell in source data than the program should not take it into consideration and not list it in my results
    4)Finally I would like to have (if this is possible) results of macro WYWIEW just below results of macro NAWIEW. Right now I have it done like this:
    - results of macro NAWIEW will be placed in rows from 11 to 99.
    - results of macro WYWIEW will be placed in rows form 101-199
    Thats how the results can not overlap on each other.

    can You help me??
    Attached Files Attached Files
    Last edited by Betinka; 07-28-2010 at 10:37 AM. Reason: Administrator request

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: help with VBA code

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    07-01-2010
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel 2007, Excel 2010 beta
    Posts
    13

    two macros in one keyboard shortcut; macro lunch allowed only in one TAP and more

    title changed

    ___________
    (sorry but I'am a rookie and i have problems with giving name to my problem)

+ 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