Work Between & Show 2 UserForms
Apr 27, 2008
I'm writing an application for myself, running on Windows Vista & Office 2003, I have no intention, as things stand, of this being used on any other PCs or by anybody using an older version of Windows or Office. I am a Mainframe programmer so my logical way of thinking is not always in line with the best way of using VBA, but I try my best & seem to be getting by, but I have a problem & question as follows:
I "SHOW" a UserForm with an option to Add or Delete. I choose Delete & a new UserForm is opened, populated with data from an Access database, I choose my option from a DropDown box, click OK & I then want the data to be deleted and to return to the first UserForm. I "UNLOAD" the latter UserForm and then try to "SHOW" the original one, but get an error message saying "Form already displayed; can't show modally" ... the first port of call:
You can't use the Show method to display a visible form as modal. This error has the following cause and solution: You tried to use Show, with the style argument set to 1 – vbModal, on an already visible form.........
View 4 Replies
ADVERTISEMENT
Feb 26, 2008
i have a form that creates a pop-up (another form) and i want that pop-up to remain on top of the original form until the pop-up's "submit" or "cancel" button is clicked - the original form should be inaccessible while the pop-up is there.
is it possible to do this in VBA?
View 6 Replies
View Related
Sep 18, 2006
I have a commandbutton that when clicked, it would make monthview1 visible. I can do this via the following
Private Sub CommandButton3_Click()
MonthView1.Visible = True
MonthView1.Value = Date
End Sub
However, I do not know what code to add so that when the same commandbutton is clicked, the monthview object would hide.
View 2 Replies
View Related
Dec 17, 2007
I have created several userforms within my excel spreadsheet and i want to be able to click a command button on one form which will then hide the current form and show the next form. In previous spreadsheets i have used the following:
Private Sub CommandButton1_Click()
Form1.Hide
Form2.Show
End Sub
However, i am having trouble with this spreadsheet as when i am typing my code after the Form1. the hide command (and show) does not appear in the little pop scroll bar that predicts what command you plan to use. (If i type it regardless then it doesnt execute)
What is even stranger is that if i write a sub routine in a module such as:
Sub Test_Form()
Form1.Hide
Form2.Show
End Sub
And then call it:
Private Sub CommandButton1_Click()
Call Test_Form
End Sub
View 5 Replies
View Related
Apr 2, 2014
I am close to finishing making up an Excel tool that takes data input from the user, does some analysis, accepts further input then prepares a report. My coding skills are not what you would call high level, so my code could probably be more efficient, but it works (well, except for this issue).
The tool opens a main multipage userform for data entry, then allows the user to view the data in the spreadsheet tables with the ability to call separate userforms to modify, delete or add records. The user then calls another userform to do some calculations and enter the appropriate results from a separate piece of software, then presses a button to prepare a report. All userforms are called from buttons in a separate userform (I'm not proficient enough and haven't had enough time to create a new ribbon in excel). At various times, messageboxes are used to convey information or prompt the user to do something - these are all simple ones with either only OK button, or OK and cancel buttons.
My problem is that when userforms are called, they sometimes appear but are totally blank (white) - see image.
blank_form.jpg
Clicking anywhere on the screen or pressing any key will bring them up properly and they seem to function normally thereafter.
In addition, the messageboxes sometimes do not appear - pressing any key will make them do so. Other than this they function normally.
The frustrating thing is that these problems occur inconsistently. I can add or change some code and it stops happening, then after testing (entering data and using the tool) starts happening again. Sometimes it just stops happening with no apparent reason, but starts again later after fixing some code or just entering some data. Not all userforms are affected at any one time and not all messageboxes have the problem at any one time.
The problem seems to occur in those subroutines where I access or manipulate data from other sheets before showing the userform or message box (but in most instances, I need to do this manipulation in order to present the correct information in the userform).
Some thought processes I have had, and unsuccessfully tried to fix the problem with (some coming from various web forums):
I thought I may have done "Application.ScreenUpdating = False" without resetting it to true, so I commented out all the "Application.ScreenUpdating = False" statements - problem stopped for a bit then started again.
Some of the userforms were modal, and even though they were not showing were still loaded so thought that this may be impacting on other userforms/message boxes, so changed all userforms to non modal - still had the problem when I opened the tool again.
Tried using "RePaint" and "DoEvents" at various points in the code after opening a userform or message box - no change.
I have tried exporting a form and its code, removing from the tool, then re-importing it. No success.
Tried the tool on another computer and the same problem occurred.
View 10 Replies
View Related
Sep 6, 2007
I'm just beginning to work with userforms and have created a couple of forms for workbook navigation. The Menu form is set to appear only on the menu worksheet and the Navbar form is set to show on several database sheets. Both forms are set th hide when the workbook is deactivated.
Private Sub Workbook_Deactivate()
Menufrm.Hide
Navbar.Hide
End Sub
The problem is that when I return to the workbook the forms do not unhide. Using the workbook_activate event causes both forms to show simultaneously. I also have the worksheet_activate event set to show the applicable form.
Private Sub Worksheet_Activate()
Application. ScreenUpdating = False
ActiveWindow.DisplayGridlines = False
Navbar.Show
Navbar.Left = Range("B3").Left
Navbar.Top = Range("B3").Top
Application.ScreenUpdating = True
End Sub
Upon returning to this workbook, I only want the appropriate form to show relative to the worksheet that is active. That is, if I was on sheet2 when I switched to another workbook, sheet2 would be active when I return to the workbook and should show the Navbar form. The menu form should show on sheet1, and the navbar form on sheets 2-5. How do I get the correct form to show when I re-activate the workbook?
View 4 Replies
View Related
Feb 27, 2009
Split from How To Set Up A Spreadsheet The Right Way
Taking onboard what you suggested I have "rethought" the layout and it is now in a single table format. What had stopped me doing this previously was the fact that I was not able to show 7 days a week for 48 weeks in columns. However thanks to the transpose function all the data is now more user friendly (See Attached Workbook)
You mention the data should be quite easy to manipulate from here, any ideas as I am struggling with the concept of how to display the data in a time series. I assume that it will involve some form of lookup function referenced to the table of times, but thats as far as i can get.
View 3 Replies
View Related
Feb 23, 2012
I am trying to determine the best way to graphically show the results of a time/work study. Basically i have a list of tasks and each list has 2 sets of numbers assigned to it. One for how much time it takes on a scale of 1-3 and a second for how much value is added for the task, again on a scale of 1-3. I want to show some sort of graph/visual that shows the number of tasks as clusters (not name of task) in maybe quadrants. With the time on X axis and value on Y axis. I am envisioning something like a 9 box that would have low/low to high/high. I can only think to create a 9 box in excel and physically put circles(clusters) in each quadrant.
View 2 Replies
View Related
Jan 11, 2009
i need to work out a formula for my spreadsheet which I use to work out cutting lists for timber frames. I need it to work out if the width of a job is for eg 2400mm i need to work out how many timber studs I need so the space between each stud is between 400mm and 500mm and this will need to work for a range of different sizes of frames. I have it written at the moment and it just devides the width by 400 and gives me a amount of studs but it would work much better if it could space them between 400 & 500.
View 4 Replies
View Related
Mar 3, 2009
In a project i am compiling i need to work accurately with times to calculate the work progress of the people in the workshop thus....here goes....
I have in work book #1 (7) sheets mon to fri + complete week + a sheet where all job numbers are collected.
From monday to friday the workmen log their times as a start time and a end time. This has to be then calculated to a total hours:mins spent per job, wich in turn then has to be calculated to a total hours:mins spent per day. And the on the complete week sheet recalculated as a total time worked per week.
View 9 Replies
View Related
Aug 24, 2009
i have a made a macro that copies info to a new sheet now that is working great but if i change the name of the work book it wont work any more so i need the macro to work with what ever name i give the workbook
the current name is
AVERAGE PRICE (update 2009) Mimmos Armico 170809.xls
i have attached the code in notepad ...
View 8 Replies
View Related
Feb 13, 2010
In column J, Cad Hrs. How to make to display (0), instead of (-0,02) when I just do other work than Cad Work? I need to separate type of work according to price hour, overtime, and so on.
View 2 Replies
View Related
May 28, 2014
I have a VBA application that seems to work fine under vista but once I start working with it in Windows 7 I notice sometimes one of my userforms do not go away when asked to hide. The code is like follows:
Application.ScreenUpdating=true
Waitingform.Hide
View 1 Replies
View Related
Jun 9, 2014
I have created a userform and command button within an excel spreadsheet to run the userform and then manipulate the data entered into the userform. However when I click the cancel button of the userform the macro tries to continue to manipulate the data entered, of which there is none and then comes up with an end/debug command. Is there an If and Then statement in VBA that I can use so that if the 'Cancel button' is clicked then the rest of the Macro won't run.
View 14 Replies
View Related
Jun 29, 2007
I designed some userforms on a worksheet for users to click and input information. However, i am wondering if it is possible to have an additional feature to the userform.
Currently the userform only have labels such as Title, Dept, Branch, Unit and the respective textboxes for user to input information. As it might be unclear to some users i would like to have an additional feature such that when user roll their mouse over the label "Branch", the user will see a box where more information is given or rather an example such as "Dept XYZ", allowing user to have a clearer idea of what to fill in. Is there any way for me to add this feature?
View 10 Replies
View Related
Jan 23, 2009
I have a UserForm which has a ListBox and other TextBox, I have an issue when I select any option from the ListBox. I transfer data from the Form onto a Worksheet, which works great until I reach the ListBox.
My problem is that when I enter the information and click submit which will save the Data and send it to an Access Database. The problem arises on the ListBox. I get an error message Run-time error 3265 "Item not found in this collection"
I dont understand what the error is, how can I get around this so that all the data is written to the Worksheet and can then be transfered to the Database?
View 12 Replies
View Related
Oct 30, 2009
I was wondering if there was a way to add comments (that you see in spreadsheets) on a userform in vb editor. So that when you run the form and the user moves the mouse over a textbox then it displays the comment.
View 2 Replies
View Related
Jun 11, 2007
I have a sheet with two user forms. One which collects a few options and a second where I use a webrowser and some more options on it to do some tasks as per the options selected in number one.
I am having problems because I need to use the options that are selected on the first user form and apply them on the second userform by using if statements.
So basicaly the question is how can I use a variable defined in one userform and apply it on another userform?
View 9 Replies
View Related
Jul 10, 2007
I'm having trouble with checkboxes - I've set up the userform but I can't seem to get it to send values to the specific cells when certain options are checked.
The way it should work is there will be an action and this could be involved with 1 process or 40 processes (and anything in between) and what will happen is the userform will pop up and ask what processes the action is applicable to. The user will then tick the correct ones and the form will then place these values in the corresponding cells next to the action.
View 9 Replies
View Related
Jan 24, 2008
1) I have added multiple command buttons as options within different categories but when I select one, all others are reset. Is ther a way to section off the command buttons into groups so that say the first three act together, the next two act together and then the last four act together, allowing a total of three options within three different categories?
2) How do I get the options from the userform to the worksheet?
3) How do I put an input box on a user form?
View 9 Replies
View Related
May 7, 2008
I'm trying to hide a UserForm (using myFrm.hide) once the command button on the form is clicked. I'm getting the following error:
Run-time error '402'
Must close or hide topmost modal form first.
Apparently the form isn't the 1st in the z-order. How can I see the z-order of my forms?
View 9 Replies
View Related
Jun 24, 2008
I have had some succcess with Userforms, but I have now tried creating multipage ones.
I assumed that when I clicked on page 2 or page 3 of the multipage control, it would take me to a blank canvas, but instead it just replicates what is on Page 1. If I put textboxes and labels on page one, it repeats them on pages 2 and 3. If I delete boxes fropm page 3, they also disapear from 1 and 2!
So im unsure how to put different labels etc onto different pages.
View 9 Replies
View Related
Jul 16, 2008
I have an easy question regarding the Multipages in userforms. If I want to use Multipages, do I simply create a new userform, then select "multipages" from the controlbox and distribute all over the whole userform ?
View 9 Replies
View Related
Jun 29, 2006
I would really like to be able to have a function in a workbook that can run methods (for example Show or Hide) on a UserForm inside an add-in like this:
Public Sub Test_Addin()
frmTest.Show False
End Sub
where frmTest is a UserForm inside the addin. After the add-in has been added as a reference, I am able to access all of its functions/subs in this way. When I try to access a form inside the add-in from outside the add-in, I simply get an object not defined error. Looking more closely, if I type in "eRFTEAddIn." (which is the name of the add-in) and look at the possible options, the forms do not show up...although the modules and sheets do.
View 6 Replies
View Related
Jul 25, 2006
I am creating a userform with a listbox.
When I select multiple values from the listbox, how do I apply the selected set of values (user can select up to 10 out of 80) to a range of cells in a different sheet (in the same workbook), which cannot contain any blank cells?
View 9 Replies
View Related
Nov 21, 2006
We have designed a data collection program in excel which use's userforms for the data entry and form printing. There are 20 userforms, each with a "Next" button which hides the current userform and shows the next userform. The first "next" button has a copy and paste code which copies a today() statement and paste's it in a different cell to record how long it took to complete the data entry. We are able to go through the program once, but when we try a second time it freezes and the cpu usage goes to 100% resulting in us having to End Task.
View 6 Replies
View Related
Dec 14, 2006
is there any way to accept the data directly on the userform(excel)? it may on some html control on userform or any other possible way to deal with.
View 2 Replies
View Related
Jan 1, 2008
Need any tips on making userforms look more appealing? Right now i prefer to have all my userforms displayed in white like the attached picture. let me know if you have something that looks better or if you disagree with the "white" theme and prefer something else.
View 2 Replies
View Related
Oct 9, 2007
I am trying to make a little game for a friend of mine. It picks a random number 1-1000 then he gets 10 chances to guess the number. After each guess, it tells him if the number is higher or lower. I have a userform that you put it your first guess, hit a button, and it tells you if the number is higher or lower. All the guess blanks and buttons are on the same UserForm. However, after you push the first button, the UserForm doesn't work anymore. How do I get it to stay functional the whole time?
View 9 Replies
View Related
Aug 12, 2008
i am trying to create a data base operated by userforms ive got so far, but now ive run into a wall. I am trying to find some code which will allow me to select a row of data (WarehouseInventory) in a user form, then copy and paste the infromation to another worksheet (WareHouseInventoryHistory) and then delete the the active row from the first worksheet.
I have attached the work book....
View 13 Replies
View Related