English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I would like to place a button in an Excel spreadsheet that will run a macro. I already know how to create a macro, and I intend to use the same workbook over & over each month. I also need to know more about storing macro's in the worksheet. This macro will go to a specific directory, open a specific file, manipulate, copy & paste that file into this spreadsheet, update the pivot table and populate other sheets throughout the entire workbook. I would like to place buttons on all the worksheets that contain data, around 12 sheets. These sheets then populate 3 reports that are due the first week of the month.

2006-09-13 10:19:49 · 3 answers · asked by Sunny_1_ 3 in Computers & Internet Programming & Design

3 answers

From the Forms toolbar select the button tool and place it where you want it on your spreadsheet. Then you can define the properties of that assign a macro to run when you click the button.

2006-09-13 12:22:50 · answer #1 · answered by stlouiscurt 6 · 2 0

Randy supplies a darn sturdy answer. I in basic terms quickly further a loop and a second on the spot for volume enter. in case you cancel on the search on the spot or volume enter on the spot, the macro ends. Sub barcodeSearch() Dim SearchTarget As String Dim myRow As lengthy Dim Rng As variety Static PrevCell As variety Dim FoundCell As variety Dim CurCell As variety Dim volume As version Do SearchTarget = InputBox("experiment or style product barcode:", "Barcode enter") If SearchTarget = "" Then go out Sub If PrevCell Is not something Then myRow = decision.Row Set PrevCell = variety("C" & myRow) end If Set Rng = Columns("C:C") 'Columns for search for defined the following With Rng Set FoundCell = .Cells.discover(What:=SearchTarget, _ After:=PrevCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _ MatchCase:=pretend) end With If FoundCell Is not something Then MsgBox SearchTarget & " develop into not discovered." Else FoundCell.Offset(0, a million).decide on volume = InputBox("enter volume:", "volume enter") If not IsNumeric(volume) Then go out Sub ActiveCell.value = volume Set PrevCell = FoundCell end If Loop end Sub

2016-11-26 21:51:30 · answer #2 · answered by ? 4 · 0 0

Click INSERT, then OBJECT. Click the CREATE tab. Browse to where you have the macro stored. Click "display as icon".

2006-09-13 10:22:56 · answer #3 · answered by Stuart 7 · 0 1

fedest.com, questions and answers