I have a User Form that I am trying to open with a button click. I made a copy of one workbook with a new name. The Buttons and Macros were all copied as well. I modified the old Userform so that I can release Version 2 of the Userform, and now when I click on the button in Excel, I get the following error : Object doesn't support this property or method. Run-Time error '438'.
The code assigned to that button is as follows:
Sub Button121_Click() ' ' Button121_Click Macro ' Macro recorded 8/11/2002 by Kale Mayfield
' UserForm1.Show
End Sub
What am I doing wrong? HELP! Once you have the Userform populated with ComboBoxes,Textboxes, etc., is there now way of making changes to that Userform? If you make changes and rearrange the locations of the buttons and boxes and labels... does that mess up the button in Excel that opens the form to begin with?
I would like to set the value of a toggle button when the userform is opened so that it coincides with the what columns are hidden on screen. Below is simple example which I have not tested or debugged. It was just what i was thinking.
VBA code
Sub Macro2() 'if col A is hidden If Columns("A").EntireColumn.Hidden = True Then 'make hidecalcs toggle button true (sunken) Userform1.HideCalcs.Value = True
I have created a userform and a command button to bring up the user form but when I click on the command button and the user form pops up I am not able to enter any data, the entire page freezes
This is the code
Private Sub CommandButtoncancel_Click() unloadme End Sub Private Sub CommandButtonOK_Click() With Workbooks("RETS results version 2.xlsm")
What I would like to do is to be able to open a second workbook from a user form, preform some work on it then save and come back to the same place in the original user form.
So in steps:
1 : user clicks command button to open user form 2: user then clicks on command button on userform that opens 2nd workbook via a yes / no message box, but closes userform on 1st workbook (would be ideal if this could stay open, but hidden) 3: user then does work on 2nd workbook, 4: userform on 2nd workbook saves then activates the 1st workbook and reopens the userform
This is where no matter what I try I cant get the command button on the 1st userform to be clicked automatically so the yes / no message box appears.
This is part of the code in the 2nd sheet commandbutton that saves / closes / opens
Code: Unload Me ActiveWorkbook.save Windows("ABC.xlsm").Activate Sheets("Request Sheet").Activate Call Sheets("Request Sheet").ForceClickOnBouttonXYZ Call UserForm1.CommandButton6_Click 'this is where I cant get it to work!! Windows("xyz.xlsm").Close ABC is the 1st workbook xyz is the 2nd workbook
This is the code on the 1st workbook I use to call on the 2nd workbook
Code: Public Sub ForceClickOnBouttonXYZ() Call CommandButton1_Click End Sub
I would like to create a button that will open a file in a location based on the date of the file. So if I click the button the file with the latest date is activated as read only. The file name is always the same except, the date is added to the file name each day.
The text displayed in the cell is a postcode and the link takes you to the Postcode location in Google Maps. I have tried linking this to macros & creating a hyperlink on the button using the same code but I am having no joy. Is there a simple way of activating this using a macro linked to a shape?
I have an excel sheet that has 3 command buttons on it, i am wanting to open a saved excel sheet that i have on my shared drive from the command button. I know the path of the saved file but how do i get the button to open this file?
As well as this i this i also have another command button what i want to open another sheet in the excel document with the command buttons.
Excel has a built in data entry form window which is opened from the ribbon, how can I create a button which opens this form for a specific table on the worksheet. It should allow the user to create or edit entries in the table. I tried creating a macro to select the data range and open the form, but this returns an error.
I have created a large process map workbook in excel that links to various areas within the document using command buttons.
However, one of the things I need users to be able to see s in a PowerPoint presentation.
All I need to do is create a command button that links to, and opens this .ppt file.
The .xsl and .ppt files will be distributed in a folder to other members of the team so I need the link to not be specific to my computer. Is it possible to avoid using the full path and just use a short path such as .../desktop/tools/process.xls so that as long as they store the folder on their own desktop the link works?
I want to open a workbook, using a button, but I don't want the workbook to be visible. I'm looking for something similar to the visible = false that you can use when opening a database file. If I use the visible = true command after the workbooks.open command, it hides the workbook that the the code is in and not the one that the code is opening.
Currently I'm just using the workbooks.open command, but I just want the file I'm opening to open in the background.
I'he a button in Excel Userform and i want to open directory using button cliick and put selected directory in textbox1 e.g. i've selected D:Susheel then it will reflect in textbox1
I have created a button on an excel form in the 2003 version and i want to create a macro that opens up a network path in windows explorer such as 'open W: ew folder ew share'
I have created a userform for users to enter data and can not seem to make it work correctly.
I am having a issue on the Row Number Textbox. I am trying to get this textbox to reflect the current row number that I am viewing with the Userform.
I am also having a issue with the Last and Add New button.
I have formulas in Column A and Column H and when I try to go to the last Row or Add a new record it recognizes the formulas and it takes me to the row below where the formulas are. (Example Row 601 instead of Row 3)
I'd like to hide all worksheets and in the excel there is only one visible sheet which is Navigation Page. I want to add several buttons on this sheet and each button will be clicked to call the other sheets.
For example, there is a sheet called Sales_Approval_Form and I'd like to add a button on navigation page called Sales Approval Form and when the user clicks the button the sheet will be open for entering data.
Looking for a way to open outlook in minimized state with excel commandbutton? seems like all the code for email put the email in outbox,and will not send.
I am trying to enable a command button on opening the Workbook, However it dosent work. I have placed the command button on the worksheet. Programatically it gets disabled on clicking it once. So i want it to be reactivated on reopening the Workbook.
I am trying to create a sheet with 'buttons' on, a bit like a 'linked table of contents', that will take the user to individual sheets (as opposed to clicking on the sheet tabs). I can see how to place Command buttons on a sheet (in this case Sheet1), but I think I need help with the code to make the buttons function as I envisage. Is this in the scope of help via this forum?
I have created simple buttons on my spreadsheet to do most everything that is needed, except to display a "Help" file. The "Help" file can be a pdf document or any other document format that will work. I don't think I need any user forms or ActiveX controls. But, then again, I am a relative newbie to VB. Is there a simple way to have a button control on an Excel spreadsheet open and display a pdf file or other document? Or is there a better way to do what I'd like?
I am trying to have a Command Button launch Outlook and attempt to schedule an Appointment.
The person would enter the date on to the cell below and the time as well. Additional I would also want it to grab email addresses from the Recipients box and place them on to the TO field....
I created a custom toolbar button which works perfectly.
Because I needed to save each workbook as a specific workbook this is taken care of by the vb code.
I would like when the button is pressed for the original workbook template to be opened.
At this moment if I have a blank workbook or no workbook open and I press the button the programme opens a version of the workbook but not the template version how do I point Excel at the templates.
It would be really good if I could not have the "close" (X) button in the top bar of my userform, I'm using it as a splashscreen, so I control when to shut it down, for that matter do I need to put up with the top ( blue ) bar at all?
I have a main worksheet that has two combo boxes. The first combo box has a list of machines. The second combo box brings up a list of models for the type of machine selected. I would like to insert a command button, that when pressed will open a different worksheet with the specs of the model selected in the second combo box. I am having trouble finding a starting point for the code to have the command button perform this.
Im have a userform with a listbox and a textbox and a commandbuttton
When i click the command button it adds the values from the listbox and textbox to the first empty row, that works fine but also want to add a new button on every row i add.
Something like this:
Column A, B, C
Listbox value, Textbox value, new button Listbox value, Textbox value, new button Listbox value, Textbox value, new button Listbox value, Textbox value, new button Etc
I have tried this code but the add button line seems to be wrong:
[Code] ,........
The whole code i use is:
[Code] .........
How to add a button togheter with the values from the listbox and textbox ?
I've made a quick example file ( not as complete as my original file ) But they have the same code.
What i wat is the OrderNr. textbox in the userform to be filled in automatically. When customer 1 orders something new the OrderNr. needs to be 3.
So i've i click on the userform launch button ( command button 1 ) I get my userform with 2 textboxes and 2 command buttons What i press command button 1, i get a new form to select a customer.
Now the part that's missing:
If i press command button 2 i want the textbox of OrderNr. to be filled in automatically with a 3.But it has to be changeable. So if i hit backspace its empty again and i can type 4 ( or what ever ).