Set Worksheet Button Properties
Oct 28, 2008
I have a button on a worksheet that activates a macro, the macro is stored in a "personal.xlsb" file. This file is copied to several users computers so they can use the macro, problem is once the button is assigned to a macro from one computer all the other users can't use the macro. What can I do to make this macro work on all computers? (Less placing yet another button on the tool bar).
View 2 Replies
ADVERTISEMENT
Nov 2, 2007
I am trying to change the text that appears on a button on a worksheet via a macro. There is only one button on the worksheet so in the macro I use
MyCaption = activecell.value 'Pick up the button text from the spreadsheet
For each sh in activesheet.shapes
sh.caption = MyCaption
'I know this would do all, but only one button as I said
next sh
which generates "Object doesn't support this property or method".
This is strange because if you get the properties box up, Caption definitely shows as a property of a button control.
View 9 Replies
View Related
Nov 12, 2008
I have a button wich will add data entered on a form to a spreadsheet if the data meets certain criteria. If it does not it will not let you add anything. I would like to add a second button that will add the data even if it does not meet the criteria but I need the second button to only be enabled with a password. Maybe a macro to change the button properties from locked to unlocked (true to false).
View 2 Replies
View Related
Apr 19, 2014
I have managed to create a command button in excel 2007 that performs a macro upon a click. But, after re-opening the workbook, I am unable to right click on the button to recall the properties window.
View 2 Replies
View Related
Jun 13, 2006
I would like to set up some option buttons so that the will be become visible and enabled when a check box is checked, and the opposite when the same checkbox is not check. This is my problem
Private Sub cbpDiscAlum_Click()
Dim myOption As Control
Dim myValue As Boolean
myValue = cbpDiscAlum.Value = True
If myValue = True Then
For Each myOption In pDiscounts.Controls
myOption.Visble = True
myOption.Enabled = True
Next myOption
Else
For Each myOption In pDiscounts.Controls
myOption.Visible = False
myOption.Enabled = False
Next myOption
End If
End Sub
It is the 5th command where it gets hung up: For Each myOption In pDiscounts.Controls. I am sure I am spelling both of the names correctly: the checkbox, and the group name.
View 3 Replies
View Related
Apr 25, 2007
I'm adding a command button at run time using excels help code;
Worksheets(newWorksheetName). OLEObjects.Add ClassType:="Forms.CommandButton.1", Link:=False, DisplayAsIcon:=False, Left:=325, Top:=24, Width:=50, Height:=20
I want to change the buttons properties including its caption etc.. I've tried using'
Worksheet(newWorksheetName).OLEObjects("CommandButton1").Caption = "Do"
But i get a run time error. Also, the add method doesn't specify what the button is called, any clues?
View 2 Replies
View Related
Sep 22, 2006
I have a workbook with 10 worksheets and I need to know the memory size for each worksheet. I know from File/ Properties that the file is 3.7mb but that is much higher than I would have expected. I can't tell which worksheets are causing it to be so large.
View 5 Replies
View Related
Sep 21, 2006
how to get a list of the properties for form control shapes (not control toolbox shapes) that are placed on a worksheet (not on a userform). Eg., a button, checkbox, combobox, etc.
If it's possible, I'm interested in working with properties like "enabled", "caption", etc. that aren't listed on the "Format Control Properties" dialog.
I understand you can edit properties of a form control shape via VBA code (See example below), however, I can't seem to find anything within the object browser about them.
EXAMPLE
With ActiveSheet.Shapes("Scroll Bar 2").ControlFormat
.Min = 10
.Max = 150
End With
View 5 Replies
View Related
Aug 12, 2006
I am trying to implement code that can handle a dynamic number of objects, specifically check boxes.
I know of eval( ) in perl that allows one to dynamically create command lines. For instance, the following code would change all of the Checkbox values to 1. The syntax may not be correct but the idea is solid.
Do While i < num_checkboxes
eval("Checkbox" .i. ".Value=1)
Loop
Does this funtion also exist in excel?
View 6 Replies
View Related
May 10, 2009
I'm building a spreadsheet for a sporting franchise using a pull-down validation menu. Once the opposing team name is selected from the drop down menu, I would like it to display the opposing teams players and their statistics.
On the database worksheet, I have a web query pulling names and statistics from the web. Each player name has his team name in his corresponding row. What function can I use that will search for that team name and report it back to the display sheet? Once I have the player name there, I think I can figure the statistic portion... But I can't seem to figure out how to pull all of the players with the matching team name into my display sheet.
Example:
A1 on worksheet "A" contains a pull down menu with team names "Lightning", "Storm", "Magic", and "Thunder".
A16-A20 on worksheet "B" contains players from team "Lightning"
A21-A25 on worksheet "B" contains players from team "Storm"
A26-A30 on worksheet "B" contains players from team "Magic"
A31-A35 on worksheet "B" contains players from team "Thunder"
B16-B20 on worksheet "B" contains team name "Lightning"
B21-B25 on worksheet "B" contains team name "Storm"
B26-B30 on worksheet "B" contains team name "Magic"
B31-B35 on worksheet "B" contains team name "Thunder"
If I pull down "Lightning" on A1 (worksheet "A"), I want the following to display:..........................
View 4 Replies
View Related
Jun 30, 2006
When I hit the print button the worksheet prints on the paper in the bin. However, there are times when I need to print the worksheet on different paper which requires me to go into the properties and change the paper source from Automatically Select to Manual Feed. I have been trying to created a macro what will switch to Manual Feed, print the worksheet and then switch back to Automatically Select but have been unsucessfull.
View 3 Replies
View Related
Feb 8, 2010
i'm using excel 2003 SP2. I have several sheets with the same buttons. And i have a final sheet where I collect a summary from every sheet. I want to create in my summary sheet a button that runs all the buttons from the other sheets, so i can get all the info.
View 3 Replies
View Related
Oct 22, 2008
Running into this issue of "transworksheet macros"
I have a master "update" commandbutton on sheet 1. I have two sub "update" buttons on sheet 2 and 3 respectively.
What I would like to do is have the user click the master button, that would "click" the two sub buttons so they run their respective macros on their respective worksheets (within the same worksheet.
I have tried pasting the macro code in the master button, telling it to select the sub worksheet and then run the macro, but the marco runs itself on the master worksheet instead.
View 6 Replies
View Related
Dec 27, 2008
I have an existing button which has either a macro or hyperlink assigned to it which links to another worksheet within the workbook. I would like to change the worksheet it is linked to. I have tried right click - edit hyperlink and picked a different sheet, and also assign macro - record new macro. I have even removed hyperlink, then inserted new but no matter what it still goes back to the same sheet.
I am in this position after copying and pasting an existing button. I'm not sure how they designed it from scratch so I would really prefer to just change the link.
View 2 Replies
View Related
Jul 13, 2008
I have made a little program for a customer at work which has 4 different worksheets.
Each worksheet works out a cost based on different prices.
I would like to make a 'Welcome' worksheet, with buttons on it so my customer can click the button which corresponds to the option he would like to cost, and then excel automatically selects that worksheet.
how to create buttons but don't know the code to but behind it. It would be nice to also hide the other 3 worksheets when they have not been selected by the welcome page.
View 9 Replies
View Related
Jul 26, 2008
creating a button (using VBA code) in a excel worksheet that can initiate a range of output data in a col (say (C1:C100)) by activating the therein formula of each cell (same as what F2 does) and then entering the cell.
Actually I have to do manually each time for each output cell after opening the worksheet that I don't want.
View 9 Replies
View Related
Apr 6, 2009
I am trying to make a button that puts the formula back into the cell after a manual entry
View 3 Replies
View Related
Dec 24, 2012
I want to assign macros to buttons from VBA. I know that buttons have a TopLeftCell property and I've used this before to point at cells around the button but not the other way round.
What I'm trying to do is have excel assign a macro to a button when the workbook is created (if thats possible - if not then just whenever it's opened the macro can be reassigned).
The recorder gives me the line of code:
Selection.OnAction = "ThisWorkbook.ImportJobsButton"
so I really want to change Selection for something that points at the specific shape. I want to do this with a few shapes.
View 1 Replies
View Related
Apr 25, 2007
I'm working on an order form in excel and wondered if someone can tell me if it's possible to add a 'submit button' to a worksheet (order) that would do the following,
1.) print 3 copies (orders) of the current sheet
2.) create a new worksheet in the same workbook with a new order number (a specific cell in the worksheet) one higher than the current one. Also naming the new worksheet with the new order number.
3.) Save the current workbook.
Maybe I'm getting a little ahead of myself here but any help would be much appreciated as I'm really rusty at this...
View 9 Replies
View Related
Jul 27, 2007
I have buttons on each of my sheets, when one is clicked code is called in my module ("modAPI"), and from that code I wish to disable and enable certain buttons, and/or change the caption of those buttons. However when I try to do:
With ws
btnRefresh.Enabled = False
End With
I get Error 424, Object Required. I've tried recording a macro of what I wish to do, and it gives me ActiveSheet.Shapes("btnRefresh").Select, but this doesn't give me the option to enabled/disable or change the caption of the button.
View 3 Replies
View Related
Jul 10, 2014
I've been looking for a way to save a worksheet as a PDF document and place it in a folder in Documents.
View 4 Replies
View Related
Feb 14, 2014
I have an expanding worksheet and would like to move a button so that it is always near the bottom of the worksheet data. When the button is pressed it reworks the worksheet and adds in some additional rows (up to 10 max). I'd like it so that the procedure also moves the button down keeping it in line with approximately the last row of data but not sure how to do this with vba...
View 4 Replies
View Related
Sep 8, 2007
I have created a calendar to enter various locations. At present they are set up using VBA and are called from buttons on the calendar. What I want to do is add a button to the worksheet and then edit its text. I will call a subroutine to use the edited text as the name I want in the calendar. What I cannot figure out is how to return the index of the button have just added so i can alter the button text. I appreciate I could cycle through all the shapes on the sheet but as I do not know the number of the one I have just added I cannot work on the correct one. I suppose I could cycle through all of them and use a carrier to count how many there are then add one to get the latest but that seems very crude not mention time consuming as I allready have 504 text boxes on the claendar.
View 10 Replies
View Related
Jul 12, 2009
I would like to have a button or a link on my spreadsheet that when it is clicked will sort my table with a pre-defined sort.
View 3 Replies
View Related
Jan 5, 2014
I inserted a Command Button ("Button1") in a Worksheet ("Sheet5"). I want to disable this button while the vba is running. How do I refer to this form control from vba?
View 1 Replies
View Related
May 24, 2007
I am trying to create a simple macro to print a worksheet with a button. The worksheet will have additions/deletions on a daily basis, so it need to adjust accordingly. I cannot figure out how to do the loop macro.
View 9 Replies
View Related
Dec 24, 2008
I have data in several (50+) columns. I want to be able to sort all my data by the column I select with one click. So, I basically want a button over each column that sorts the data by that column. It would be ideal to have the same "Sort" macro that is attached to all the buttons. The macro should somehow know that the column the button is in, is the column to sort by.
View 9 Replies
View Related
Jul 14, 2009
Not to sure if it can be done but i would like to have a button on my spread sheet that once pushed it automaticaly saves my worksheet as a PDF in a selected company folder in my documents.
I know if you go to file and save as PDF, then save in selected folder will work, just looking for a quicker way so my staff just needs to push one button on the worksheet and it does it all. (dummy proofing the form i guess)
View 9 Replies
View Related
Oct 24, 2006
I am trying to create two macros. The first macro will add a button, and the second macro will delete the button. I am noticing that when I add the button in the first macro, Excel is automatically naming the button (i.e. Button 26), and then when I try to delete the button with the second macro, this button name is not recognized. How can I name or set the button as a variable so that I can successfully run these two macros?
View 6 Replies
View Related
Feb 2, 2007
I have two option buttons (Designerbutton1 & Designerbutton2), when I copy them and paste them to a different worksheet their names change to Optionbutton# (# = next available number). Anyone know why & if I can prevent this. I cannot have a code that says Optionbutton16 should be renamed to what I want it to, because right now 16 is the next available # but what if I add an Optionbutton16 later on my own.
View 2 Replies
View Related