Question about Microsoft Office Professional 2007 Full Version for PC

1 Answer

Macro Need to know how to create a macro to set all the forms on a excel sheet to a default value. Also have created a macro to paste values from specific cells to a different sheet. need to know how to instruct the macro to automatically paste the values in a different row every time

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Corporal:

    An expert that hasĀ over 10 points.

    Problem Solver:

    An expert who has answered 5 questions.

  • Contributor
  • 18 Answers

Hi alwinkumar

You can set a default value in most form items under the properties of that item. Look for "value". You can also do this in code, by setting up a sub routine to set/reset the values on your form. Then just run the sub routine before you open or enter the form.

Private Sub resetForm()

'formname.itemname = value
UserForm1.Label1 = "Hello World"

End Sub

For the second one you have a couple of options, you can find the bottom on the data and store the row index in a variable, use a loop to find the next empty cell in a row, and store the value or you can use the current region method to select all the cells with data continously touching the selected range. Example below

numberOfRows = Sheet1.Range("A1").CurrentRegion.Rows.Count

Posted on Jul 19, 2008

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Step by step instructions on how to create a macro, create form f


You can create a macro by using the macro recorder to record a sequence of actions, or you can create a macro from scratch by entering Visual Basic for Applications code in the Visual Basic Editor.
Open a new document.
From the Tools menu, choose Customize.
Click the Commands tab and then scroll down in the Categories box and select Macros. You’ll see the names of any macros you've created in the Commands box on the right-hand side.
Click, hold, and drag your macro onto any toolbar and release, as shown in Figure D. A button with the name of the macro will appear on the toolbar.

May 25, 2010 | Microsoft Office Word 2007 Full Version...

1 Answer

How to create macro button in microsoft excel 2007 because


well follow the steps below to get your job done:

To create an option button in Microsoft Office Excel 2007, make sure that you add Option Button (form control) to the Quick Access Toolbar. To do this, follow these steps:
  1. Click the Microsoft Office Button, and then click Excel Options.
  2. Click the Customize category, select All Commands in the Choose commands from list, select Option Button (form control), and then click OK.
To create an option button and to assign a macro to it, follow these steps:
  1. In Excel 2003 and in earlier versions of Excel, click Option Button on the Forms toolbar, and then draw the outline of the button on the sheet.

    In Excel 2007, click Option Button (form control) on the Quick Access Toolbar, and then draw the outline of the button on the sheet.
  2. Select any cell in the worksheet.
  3. In versions of Excel that are for Microsoft Windows, right-click the option button, and then click Assign Macro.

    In versions of Excel that are for Macintosh, press COMMAND while you click or press CTRL while you click, depending on your operating system version. Then, click Assign Macro.
  4. In the Assign Macro dialog box, click the name of the macro that you want to assign to the option button, and then click OK.
When you click the option button, the macro will run.


good luck ...:-)

Apr 08, 2010 | Microsoft Office Excel 2007

1 Answer

Does Excel 2007 have a way to pause a macro so information can be inserted?


you can used the "input box" function to bring up a popup box that asks for an input.

Code is something along lines of (from memory - so you might want to check the help file)

a = inputbox("Title", optional bits like default and message)

a is returned as the value input

(sorry i can't be more specific and give exact code - don't have excel on this computer, else I could copy in examples).

There are also function which will pause the macro and allow other activities to occur - these generally pause for set time, to use these you would have to have a loop that had a pause and then checked to see if the input had been entered to decide whether to re-loop or whether to continue with the input value

Nov 11, 2009 | Microsoft Excel 2007 for PC

2 Answers

Using Macros in Excel sheet Requires Programing.. or it can be done, as we do Vlookup and other formulas


Creating Macros does not require programming. The only suggestion I would make if you are new to macros - break down your task to very small sub tasks, in order to avoid confusion.

Jun 09, 2009 | Microsoft Excel for PC

1 Answer

Reminder in excel


There are a couple of types of spreadsheet - Depending on the size of the data you are working with - filter may the quickest option or Query report.

Your worksheet will contain all your data i.e. Customer, contact no, outstaning actions and due date - You can create a filter aon this set criteria on the due data - as less than or equal to todays date - which will only display your outstanding actions required by today or earlier.

Another option if you have installed MS Query, is to create a seperate report - again using the criteria of due date being less than or equal to today.

Producing this from your existing data is much easier than trying to re-create your data - But I can send you how I would create this sheet if the above explanation is not easy to follow - If you let me have your email address.

May 31, 2009 | Microsoft Office Excel 2003 for PC

1 Answer

I need to create a macro where if one row matches with other row


create your formula
go to tools/macros/record macro/select your hot key <ctr+*>

Apr 03, 2009 | Microsoft Excel for PC

1 Answer

Macro to be used in Excel


Instead of me teaching u. i would suggest u learn it by following the simple steps.

1. Click Tools > Macros > record
2. do some common operation like copying data, creating graphs, etc.
3. press alt+F11 to go to vb editor, to see ur macro recorded
4. study it ... u will learn easily

or

try the book 'Microsoft Excel Visual Basic Macros Examples' at http://www.add-ins.com/vbexamplestopics.htm


bye

have a nice day

Jan 26, 2008 | Business & Productivity Software

1 Answer

View Reports


Hi, There a couple of different way you could do this and I have put two lots of VB code below that you can modify and use. Firstly you create the Combobox list by choosing the option that you will type the values yourself, you then type in all your report names on each line. After that you can then go to the VB code editor and paste my code in and modify it by changing my report names, (Customers) etc to your report names. Make sure you choose the Combobox and the On_Click option in the VB editor to paste the code into.  I like the first method better which checks the value of the Combobox and then opens the corrosponding report in the maximised form. The second method does the value check before running an assigned macro to open each report. With this you must first assign macros to each report in Access.  Remember each of these bits of code must be placed between the "Private Sub" heading and the "End Sub" ending, and change the "Combo23" name to reflect your combobox too. If you need a hand just email me.

First Method
 
If Combo23.Value = "Customers" Then
    DoCmd.OpenReport "Customers", acViewPreview, acWindowNormal
    DoCmd.Maximize
   
ElseIf Combo23.Value = "Customers 1" Then
    DoCmd.OpenReport "Customers1", acViewPreview, acWindowNormal
    DoCmd.Maximize
   
ElseIf Combo23.Value = "Customers 2" Then
    DoCmd.OpenReport "Customers2", acViewPreview, acWindowNormal
    DoCmd.Maximize
   
End If

Second Method
 
If Combo23.Value = "Customers" Then
   DoCmd.RunMacro "Macro1"
   DoCmd.Maximize
ElseIf Combo23.Value = "Customers 1" Then
    DoCmd.RunMacro "Macro2"
    DoCmd.Maximize
ElseIf Combo23.Value = "Customers 2" Then
    DoCmd.RunMacro "Macro3"
    DoCmd.Maximize
End If

Oct 28, 2007 | Business & Productivity Software

2 Answers

Need to Know fully info about Macros


Macro is a simple way to automate tasks in Microsoft Office programs. It allows advanced users to program or create their own commands in Office, thereby automating tasks. For example, a user might want to create a table with four values already in them. The user could create one, and then copy it, and paste it. However, when you restart your computer, that data is lost. Unless you open the old document and copy the table, you'll have to start all over again. Macros helps you do your tasks. By recording the table creation to a macro, creating the same table over and over is just a simple macro away.

Sep 26, 2007 | Microsoft Office Standard for PC

Not finding what you are looking for?
Microsoft Office Professional 2007 Full Version for PC Logo

178 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Business & Productivity Software Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18298 Answers

Tony

Level 3 Expert

2598 Answers

Are you a Microsoft Business and Productivity Software Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...