this macro is adding the data to combo box before you make form visible if you check sheet1 cell d23 , d24, etc or a23, a24 its having values these values are added to combobox1
Sub OpenDetails() Dim i As Long For i = 23 To Sheets(1).Range("d23").End(xlDown).Row With OrderForm.ComboBox1 .AddItem Sheets(1).Cells(i, 4).Value End With Next i For i = 23 To Sheets(1).Range("a23").End(xlDown).Row With OrderForm.ComboBox2 .AddItem Sheets(1).Cells(i, 1).Value End With Next i OrderForm.Show End Sub On Fri, Jan 28, 2011 at 2:30 AM, hanumant shinde <hanumant_5...@yahoo.co.in>wrote: > File attached. > there are many validations can be done on this please do that. > data is going to proper cells now but there should be validations for data. > > e.g. in date text box if u write "jsdhg" it will accept this also and so > on. there shud b data validation for this. > > > ------------------------------ > *From:* Ashish Pradhan <ashlyprad...@gmail.com> > *To:* Excel Help <excel-macros@googlegroups.com> > *Sent:* Wed, 26 January, 2011 6:50:08 PM > *Subject:* $$Excel-Macros$$ Help With UserForms > > Hello > > Much earlier I had sent a query regarding Userforms in Excel and the group > was spontaneous and kind enough to solve my query exactly as I needed the > output. > > I may not have been an active participant to the queries (simply because my > knowledge of excel is minuscule in comparison with many of the group > members) but I have certainly tried many of the solutions posted by the > members. I like to call myself an "Excel Buff" and occasionally think of > various solutions to everyday and practical problems. During a discussion > with a friend, I was of the opinion that a billing software can easily be > developed in excel. Something similar to the kinds we see in hotels / > restaurants. > > I began to work towards building such a software in Excel using UserForms. > Now I am stuck. I have attempted to make a begining. Please see the attached > Excel File. (Am using Excel version 2003) > > The UserForm that I have created has a lot of bugs. Most of it I think is > in the naming of the Code and the Code itself. > > Would someone be kind enough to please take a look at it. > > The Sheet "Main" has two hidden columns. > > Is it possible to Use the Data in these Column A (hidden) as a drop down > list in the User Form against "Order" in the userform? Similarly, for Name > of the Waiter in the Userform, is it possible to have a drop down list as in > Column C? > > In Sheet "Details", my first Column starts with "Date" in the format > DD/MM/YYYY. If there a way to automatically sort the Data in Sheet > "Details". The primary sorting should be on "Date" column and then by the > "Table" Column.. > > At different stages, I have managed to get the userform working, but the > moment I add / modify some parts of it, the compilation fails.. > > Need Any help possible. > > > Thanks > > > Ashish > > P.S: Assure you that this is not a professional / paid project in any > circumstances. This is purely something which I have undertaken simply to > satisfy my own curiosity and usage of Excel.. > > > > > > > > > > > > > > > -- > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > -- *Regards* * * *Ashish Koul* *akoul*.*blogspot*.com <http://akoul.blogspot.com/> *akoul*.wordpress.com <http://akoul.wordpress.com/> My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830> P Before printing, think about the environment. -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel