Assume that the workbook Book1.xls opens a user form named myUserForm.
I'm trying to show only the user form on the desktop when I open Book1.xls, with Book1.xls minimized on the Taskbar.
And , if the Cancel button on the form is clicked, then unload the form and close Book1.xls.
In ThisWorkbook, I have the event:
Private Sub Workbook_Open() ActiveWindow.WindowState = xlMinimized ShowTheForm End Sub On the Form, I have the Cancel button:
Private Sub btnCancel_Click() Unload Me ThisWorkbook.Close True End Sub
The above procedure shows the form, with Microsoft Excel blank window in the background, and produces a small bar at the bottom left of the screen for Book1.xls Click the Cancel button, and both the Form and Book1.xls close, but the blank Excel window remain open !
I suppose I would not be able to edit this version of Book1.xls, but that is fine for now!
Have 2 workbooks very similar and need to copy a working user form to newer workbook. Exported and Imported the user form to the new VBA project but can't figure how to bring user form into the new worksheet.
I have an excel file with data in it.I also have designed an user form so that the user can select few options in that to filter the excel file and get a new file. The reason i am doing this is because the people who are going to use this do not have any knowledge of excel. In the sample attached, the tab "Data" has the data in it. The User form should filter this particular sheet and throw out a new file. In the userform, I have mentioned the fields to be filtered.
I need to filter data based on criteria based on user input form that is in another workbook. For example, I have a list of departments, I want to create a userform for the user to enter department number and then have excel filter only the data belonging to that department. The person will then update the department records and save the file.
Here is partial code I have been working on but having difficulties:
Dim FilterCriteria Dim CurrentFileName As String 'Get the current file's name CurrentFileName = ActiveWorkbook.Name 'how do I call another workbook?
Need a way of quickly telling whther a user as a workbook open without trying to open the workbook yourself? I have many individual workbooks which I need to regularly update, before I can update them I have to check whether anybody else has them open and then wait until they are out before I can do the update.
I have a program that opens an excel-workbook, I first check whether the file is opened by another user(open for read-write). This works fine, but I'd like to know which user has the file open with VBa code. ex.
workbooks.open .... if open then msgbox " Book opened by user" end if
So it's the same as you open an excel(with your windows explorer) on a network and you get the message that the file is already opened by the user....
I need the code to allow a user to select a column of their choice in an open workbook of their choice so that data can be lookuped up and changed. I am happy to create the code to do the lookup/changing, however the nearest I have found is the use of an inputbox which is limited to the active spreadsheet only. Some people have said the input box could be used over to another spreadsheet but I have not found that to work.
What I will need returned is the workbook name, sheet name and column. That will allow me to point to that and do the task.
This code could be used by 5 people and those 5 people could be running it on 20 different spreadsheets.
I thought this would be easy to find but it has eluded me. When using Excel normally, if you do a simple lookup formula, or create pivot function, excel prompts the user to select the workbook/sheet.
I am making a macro that requires that user to enter a directory path into a input box and the macro will open the file. Right now it works fine bit i would like to change the code so that instead of using an input box it brings up a box that will allow them to browse files on their computer and then select one to open.
I have a Database and user form, in the user form i have a field named “Vehicle No” this is a combo box from which a user needs to select the Vehicle numbers, and all these are working fine now, I need your help in the following:
When user selects the second field named "Select Vendor name" i need a pop up window which shows all the Vehicles belongs to the vendor which they have selected, and with the popup window user selects the vehicle number then the Vehicle number combo box should be filled.
Currently users have to select by scrolling through Combo box which takes long time and difficult to find by scrolling.
I have a user form that has a combo box "City" two text boxes one called "Flight" and the other "Date". What I'm trying to do is to prevent the user from saving the data input from the user form if any of those three fields is left blank. The code that I have so far checks all of the required fields, if any are left blank a message notifys which field(s) is left blank and return the focus back to that field. But the rest of code also fires.
What I really need is either to stop the code if any fields are blank and return the focus back to the blank field, the user completes the field(s) and clicks the save again, or better yet, pause the code until all the required fields are completed and then complete the save. (There is actually another 200+ lines of code in this sub, but I deleted it to keep the post a little shorter.)
I have created a registration workbook for this year's youth sports league. All of the information is entered into a User Form and separated onto it's appropriate sheet designated by the child's age. Next year, I would like to use this year's workbook to look up returning players.
Will it be possible to add a "lookup" button into my form, or create a lookup program, that once the registrar clicks on the correct player, the information is plugged into the User Form, the registrar adjusts the age and any necessary info, presses enter, and the information is copied into the appropriate category in the new workbook? I haven't worked with User Forms long enough to know if they can be filled in that way, but if this can be done, you are the people who would know.
I'm using a series of user forms for data entry to a workbook, some of them open next stage user form on completion (OK cmd button).
All that is working fine, but I'd like the initial form to close on showing the next one. I've tried adding Unload and Hide commands following the frmInsertEntry.Show (Next stage form), to no avail, but I'd like this user form to close or hide at the end of the sub.
Private Sub cmdContinueType_Click()
ActiveWorkbook.Sheets("Records").Activate 'Select starting cell in record sheet Range("N3").Select
Do If IsEmpty(ActiveCell) = False Then ' Search for next empty cell ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True
If optDrillType = True Then frmDrillEntry.Show Else frmInsertEntry.Show End If
I have created a spreadsheet some time ago and have been asked to improve on it but I'm rusty with VBA.
I have an automated ordering system that saves each sent order as the date e.g "05-04-2013.xls" but the management team want a graph with the data for the last 4 weeks compared. I have created a seperate workbook called "consumables report.xls" which has a column with the products listed followed by columns "Quantity" and "cost" which is repeated for the 4 weeks of the month.
I want to add a button to prompt the user to choose the saved order e.g "05-04-2013.xls" (all orders saved in same directory) to copy and paste the quantity and cost columns (c8,D69) into "consumables report.xls". I got this to work earlier but it would only paste the formulas and not the values. So I need
A prompt to open workbook Copy range (c8,d69) Close work sheet Paste special .value (c8,D69)
I dont care if it has to open the workbook to copy the data as this will only be used once a month so it dosnt matter how slow the code is.
I have Monthly sales sheets that import my cash register data into them. I wanted to set them up to do everything without being there. So I have my task manager open excel at 9:30pm everyday and it runs the macro to import the data into the correct day of the month. Here is the workbook
Private Sub Workbook_Open() Dim dTime As Date dTime = Time If dTime >= TimeValue("9:30 PM") And _ dTime < TimeValue("9:40 PM") Then ImportData End If End Sub
This is in my July spreadsheet only. So is there a way to make it know which month spreadsheet to open on the 1st of the month? So come August 1st it will automatically open the August workbook and input the data for the first day? By using the date?
I have a user form that I want to take the information and have it input on the worksheet. I want it to start at A3 and check to see if that cell is "" and if it is not then enter the data from the from horizontally. If A3 is not "" then continue down column A untill the first nonblank cell is and then select that cell and have the data entered horizontally.
I have this code so far but it is not working.
Private Sub cmdSubmit_Click() Dim Month As Variant
Month = Me.cmbMonth.Value
I have done a bit of excel programming last year but have not done any for the last 4 months so I am a bit rusty.
I've written a workbook that enables my workmates to enter sample information easily (workbook attached). What i need help on i cant get the combobox 's on the user form to pick up the related info in worksheet named "data" and insert it into the relavant coloumn in tab named "Results". I can get it to work without using combobox's and just typing the info into a textbox but i wanted to use combobox's.
Another thing i wanted to do was pick invidual results and send them the "Report" for printing. how would i do that.
I have a project, i want to create a user form, basically i have a work book that contains dinner menu's on column A and ingredients in column b. I would like to create a user form that have a drop down box that would show all the possible menu's referencing my workbook sheet1 column A values. and by selecting a item, i would like to be able to show all ingredients needed, is there a way to do this?. I hope so, it would be so cool to do this.
I have created a multi utility user form that user can initialize by a shortcut key. The problem if user want to see the content on sheet or want to change the active cell, he has to close the form and then do any action. This form is initialized by a command and default included in excel as a Add-in. Is there is any way to make the form floating i.e. user can manipulate the data and can see the form as well.
On a userform, I have 5 paragraphs of text that the user needs to read. The problem is the user can't see all 5 paragraphs, the user is only able to see about two paragraphs. I don't want to make the userform larger but I would like to add some type of scroll bar that would allow the user to scroll up and down to view all of the text.
I have created a user form (thanks Datsmart), and now need to place the data that will be inserted in that userfom onto my spreadsheet.
The spreadsheet will have 50 rows, each containing a different project. There will be a button on each row to activate the user form for that specific row. They click the button on the spreadsheet, and the user form opens. They enter the data on the user form, and once they click the "add comment" button on the user form, the data should be entered in the last cell of the row on which the button is located.
Now the complicated part:
The users will use that for to update the project from week to week, but each week's comment needs to go in the same cell, but above the previous comment.
Jan 1: Project lauched
Jan 6: Project budget submitted Jan 1: Project lauched
Jan 22: Budget approved Jan 6: Project budget submitted Jan 1: Project lauched
The date being the date from the user form, and the comment being the comment from the user form. If the latest date can be bolded that would be a bonus.
They each have to go in the same cell cause all relate to the same project. This same thing will be repeated 50 times for each different project.
I came here yesterday asking for help and was helped immediatly, but I have another question/problem. I got my user form up and running, however I've just been informed that the form has to be able to be printed out. So basically I need this user form with all the data on it and I need it to be printed.
Is there a way to add a command button perhaps that prints out the form with the data on it? (Ex: Imput Data, hit Print command button, have an electronic and hard copy of the information)
I have a user form with 2 textboxes (used as parameters for an ODBC query). The entry should be a period, as yyyymm. How can I check, for instance when clicking the Ok button after entry, that both textboxes are of the "000000" format and the last 2 numbers are between 01 and 12?