create macro

Hi,
How can I create a TWO seperate macros in a spreadsheet in Excel:
there are icons/pictures which have a macro attached to it. How do I attach
the macro?

macro 1:
to move to a different cell address like B158.

macro 2:
to print a certain range of cells. (say A158:G200)

Thank u in advance
Khalil



0
khhandal (39)
2/11/2005 10:45:46 AM
excel 39879 articles. 2 followers. Follow

1 Replies
984 Views

Similar Articles

[PageSpeed] 56

One way:

Put something like these in a regular code module:

    Public Sub MoveMacro()
        Application.GoTo .Range("B158"), Scroll:=True
    End Sub

    Public Sub PrintCertainRange()
        With ActiveSheet
            .PageSetup.PrintArea = "A158:G200"
            .PrintOut Preview:=True
            .PageSetup.PrintArea = ""
            .DisplayPageBreaks = False
        End With
    End Sub

Right-click your pictures, choose Assign Macro, and assign each picture 
one of the above.

        In article <eEpceaCEFHA.1188@tk2msftngp13.phx.gbl>,
 "Khalil Handal" <khhandal@yahoo.com> wrote:

> Hi,
> How can I create a TWO seperate macros in a spreadsheet in Excel:
> there are icons/pictures which have a macro attached to it. How do I attach
> the macro?
> 
> macro 1:
> to move to a different cell address like B158.
> 
> macro 2:
> to print a certain range of cells. (say A158:G200)
> 
> Thank u in advance
> Khalil
0
jemcgimpsey (6723)
2/11/2005 12:23:29 PM
Reply:

Similar Artilces:

How do I create a date from data in seperate columns
I have date and time data in seperate columns and I want to combine them into one datetime field. How do I do this? you can do an update query and update a new field to this: Cdate([DateField] & " " & [TimeField]) On Thu, 21 Jan 2010 08:16:02 -0800, UGAJohn wrote: > I have date and time data in seperate columns and I want to combine them into > one datetime field. How do I do this? These fields are Date/Time datatypes? Just add them together: =[DateField] + [TimeField] #1/5/2010# + #4:55 PM# = #1/5/2010 4:55 PM# -- Fred Please respo...

Autonumber created.. problems in the future?
I managed to create an autonumber in Microsoft CRM. I did this by making a field "Number"(in the database "New_Number") and I published it on the form. Then I went To the SQL server and I changed the field in the table to Identity Yes, Identity seed 1, Identity Increment 1. I locked the field on the form. It worked! I think that this is not supported by Microsoft. But has anybody got any idea which troubles i could get with this configuration? San ________________________________ Do you know all add-ons for Microsoft CRM? Visit http://www.pimpmycrm.com The biggest dange...

Creating A Stack & Line Combo Chart
Is it possible to create a stack chart with 4 series stacked, and a 5th series being a line. If so how do I do it. Thanks very much 1. Create a stacked column chart from all the data 2. Select the series that you want as a line 3. Choose Chart>Chart Type, and choose the Line chart type, and one of the subtypes 4. Click OK Ty Archer wrote: > Is it possible to create a stack chart with 4 series > stacked, and a 5th series being a line. If so how do I do > it. Thanks very much -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

Naming a Macro with a Letter
I have saved a series of macros to use in a workbook, but Excel will not allow me to name a macro "C." I have used lots of other letters with no problem, but when I name a macro "C" it tells me that it is an invalid name. Is there any way around this? If not, what is the reasoning behind it? Any help will be greatly appreciated. Thanks! I use xl2003 and I could name a macro "C". But I couldn't run it via tools|macro|macros... I could write if I specified the module it was in (just typing: module1.c, then clicking Run was sufficient). In fact, if I c...

Creating Outlook 2000 Distribution List from "To" contents?
Is there a way to create an MS Outlook 2000 distribution list from the contents of a received e-mail's "To" line? I know right-clicking on an individual allows me to "Add to Contacts." I'd like to highlight multiple (or All) names and be able to add to an existing, or a newly created, Distribution List. How can I do this to avoid manually having to add each name to Contacts, then individually bringing them into a Distribution List? Thanks, Dave ...

Creating Sales Invoice in a different Currency
Hello, Using GP 9 I need to create sales invoice in a different currency but the Currency in the invoice entry is disabled. Is there a way to make it enable? How do I change the base currency? -- Mike First Question....are you licensed for the multi-currency module? "Mike9900" wrote: > Hello, > > Using GP 9 I need to create sales invoice in a different currency but the > Currency in the invoice entry is disabled. Is there a way to make it enable? > How do I change the base currency? > -- > Mike I am using MSDN provided GP. I think it has the right. --...

Can i create my own fomrula made up from several excel ones?
I am using the nested functions below "=if(vlookup(1, GRID, 3,false) = 0, (1, GRID, 4, false), (1, GRID, 3, false))" i.e for the row with the digit one in its first column return the value in the third column else if empty return the value in the fourth column. my problem is i am repeatedly using the line above exactly only changing the value i am searching for (1 in this case )) so ideally i'd like to do something like define myformula(X) = if(vlookup(X, GRID, 3,false) = 0, (X, GRID, 4, false), (X, GRID, 3, false)) is this possible????????? I don't know if thi...

bubble trubble
I have a few questions relating to bubble charts - if anyone can help I would be very grateful 1) when I select a range of data and make a bubble chart out of it (using either the wizard or pressing f11) excel seems to have a fit - when I look at source data>series the ranges are all wrong and so I have to manually change every one individually. I am charting from a very simple table col 1=labels, col2=x values, col3=yvalues and col4=bubble size Am I setting up the source range in the wrong way, or is this just a 'feature' of excel? (I am using excel 97 sr-2 @ work, but have tried...

Creating Multilingual Application
hi, I have created one pplication I have also added "_UNICODE" /D in project settings. Now I want to display text in japanese on the buttons. If I have two buttons, Is it possible to display text in japanese on one button and text in english on the other? Hi can you tell me in which environment are you working so i could explain the localization. yes for multilingual u need localization so search on this keyword with the specific environment. bye Hi, I am using windows 2000 and VC++ 6.0 mfc u wanted to show japnees text on one button and english on another button. then why do ...

sheetchange event macro.. what am I doing wrong?
hi.. i'm just tryin to make it so that when the user inserts a 'g', 'r', or 'y' into a cell, the font for that cell changes color appropriately.. this looks fine to me but nothing happens... --------------------- Option Compare Text Private Sub Workbook_SheetChange(ByVal sheet As Object, ByVal cell As Range) If cell.Value Like "*g*" Then cell.Font.ColorIndex = 4 ElseIf cell.Value Like "*r*" Then cell.Font.ColorIndex = 3 ElseIf cell.Value Like "*y*" Then cell.Font.ColorIndex...

Internationalization for formulas & macros #3
No. It's an Excel 2000 file -- micto ----------------------------------------------------------------------- mictou's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1637 View this thread: http://www.excelforum.com/showthread.php?threadid=27750 ...

USer cannot create rule
I have user getting the following message when creating a very simple rule in outlook 2002. "Changes to the rule could not be saved. There is not enough memory or the rules are too complex. Try deleting some rules." The only rule set is that if messages are sent to him or cc'd to him that they be forwarded to two people. Any help would be greatly appreciated. ...

Subtotaling variable data in a macro
Hi. Working on a macro subtotal in which the amount if data is variable. Let me elaborate. I am creating a macro to organize a report from data which is variable. While all my columns of data remain constant (so it's easy to format and pretty up the report), the amount of data in the columns changes. One day the data can be only five rows long and other days, it can be 250 rows long. I have to sort the data by Provider ID (numeric - column A) and Provider name (alpha - column B)---this is no problem. I then need to subtotal the Amount Paid (column K) for each Provider ID. These sub...

How can i create in one cell scroll-down different options?
Hi there I am working in excel and I would like to create like a menu/scroll-down in one cell with different options (like including kind of transport, train, airplane, car, etc...) where you have an arrow on the right side and you can choose one of the options given. Thanks for your help. You can use Data Validation to create dropdown lists. There are instructions in Excel's help, and here: http://www.contextures.com/xlDataVal01.html Francisco wrote: > Hi there > I am working in excel and I would like to create like a menu/scroll-down in > one cell with different op...

Macro Command Button
I'm trying to assign a command button on the worksheet to a macro. If I read the help instructions correctly it states to put a command button on the worksheet then 'right click the command button and select shortcut to macro'. I don't get a shortcut option when I right-click the command button????? I've to 2 macros created and working but I'm unable to setup the button. Help anyone....thanks There are two buttons that look alike, but behave differently. It sounds like you used the commandbutton from the Control toolbox toolbar. Delete those and grab a button f...

how to transfer a T-SQL query to a semantec query and create the M
How to transfer lots of T-SQL input from users or files to a semantec query used in Reporting Service of SQL Server 2005 and create the MSDL file accordingly? ...

How do I create an investment portfolio for my clients?
Hello, Currently I am a financial planner, and, having recently left a major firm, I am attempting to streamline my marketing process. As such, my goal is to create an excel document (or locate a template) that allows me to include the following: Holdings (cash equity, mutual funds, bonds, etc) with a number of different graphs, including allocation, sectors, etc. If possible, I would like to be able to update this chart for client account changes. I was hoping that someone might be able to provde some type of insight into how I would go about this. I certainly appreciate everyone'...

copy and paste macro 04-09-10
I need help creating a macro to copy cells C3:C22 and then PasteSpecial, ValuesOnly to cells O12:O32. Then the next time I run the macro, I need it to paste the C3:C22 values into the next available blank column, P12:P32. It has to be able to do that for a total of 12 times, each time using the naxt available blank column. It then has to automatically erase it all, O12:Z32. Then it would start over with the O column again. I would appreciate it if somebody could show me the complete macro to accomplish these steps. Thank you. Robert This should do what you need: ...

How to run a macro if I don't know the name in advance
I am trying to create a macro on the fly using vb code from an existing file, and then run the Macro that was just created. Is there a way to find out the name of a Macro programmatically so that I can pass it to the Application.Run method? Maybe: myMacroName = Application.Dialogs(xlDialogMacroOptions).Show "Himanshu" <Himanshu@discussions.microsoft.com> wrote in message news:B140EF14-FF81-4E25-B1E2-8CD6EF813F56@microsoft.com... >I am trying to create a macro on the fly using vb code from an existing >file, > and then run the Macro tha...

Post URL
Hey, I have been informed that it is possible to use the Post URL to create a case via a workflow. If anyone has an idea on how to do this, it would be greatly appreciated. Rgds Jefferson ...

eConnect
Hello, This is my first eConenct implementation. I've had partial success using eConnect so far in terms of transferring data successfully into Great Plains. For example, I've been able to create a new customer in Great Plains via eConnect. However, I'm having difficulty with something that would seem quite common to me. I'm testing my ability to create an SOP transaction (a customer invoice), but I've not had any success. Starting from the "CSHARP SalesOrder Console Application" sample, I modified it to be compatible with our data. However I keep ge...

Creating additional panes of data in CRM 1.2
When we select a Contact, I want to be able to bring up both the History and Activities associated with the contact. I'd like to create a 'window pane' on the right side and the bottom that displays this information - the question is can I do this without having to create a completely new ASP form? Thanks! David David, what you want is not currently possible with the out-of-the-box CRM. You have two options, build it yourself using the SDK, or purchase the functionality from an ISV that has already built it (www.salentica.com , www.c360.com). Dave <anonymous@discuss...

Killer macro idea for business mailings
One of you programmers should write a macro to validate a city from zip code. I receive excel files from response cards and a lot of people will put some random letters for their city instead of the actual city name, or maybe they'll put the wrong abrieviation for their state. It would be awesome if all the zipcodes could validate the state field and change if necessary and the same for the city fields too. Okay, have at it :) Okay, well good idea I think anyways, but it turns out that my columns just weren't wide enough so it didn't display more then 2 letters. ...

Excel Scripting Macros
All, I spend a lot of time evangelising about the use if VBScript to control Excel. I even wrote a book on the subject: http://nerds-central.blogspot.com/search/label/Baby%20Steps I am trying out running some forums to so people can discuss and get help on running Excel from VBScript. If anyone is interested, they are now available here: http://www.nerds-central.com/phpBB3/ For more information on what I am on about - see my website: http://nerds-central.blogspot.com/2008/01/excel-vbscript-index-page.html Any problems just email me ajt@nerds-central.com. All the best AJ ...

how do I creat a diary spred sheet
Has any one a spread sheet for a diary in excel that theyn could send me as a template please steve "Diary" A daily record, especially a personal record of events, experiences, and observations; a journal. A book for use in keeping a personal record, as of experiences. ********************** Open a new workbook. Select A1 and hit CTRL + ;(semi-colon) to enter today's date. Select B1 and start typing in your day's activities and experiences. Note: keep your cell notes to 1000 characters or less. Use more cells if you have a lot going on in your life. Format cells ...