User Form Problem #2

I have done some reading on using User Forms within VBA.

I am taking data from the form and putting it to an Excel worksheeet.

Here is the code I have so far...  This all works...

Private Sub cmdSaveData_Click()
Dim LastRow As Object
Sheets("DailyData").Select

Set LastRow = Sheet1.Range("a65536").End(xlUp)

LastRow.Offset(1, 0).Value = txtDate.Text
LastRow.Offset(1, 1).Value = txtRawPounds.Text
LastRow.Offset(1, 2).Value = txtRawSolids.Text
LastRow.Offset(1, 3).Value = txtFrenchFryPounds.Text
LastRow.Offset(1, 4).Value = txtBatterPounds.Text
LastRow.Offset(1, 5).Value = txtFrSpPounds.Text
LastRow.Offset(1, 6).Value = txtUnFrSpPounds.Text
LastRow.Offset(1, 7).Value = txtBakedPounds.Text
LastRow.Offset(1, 8).Value = txtFrenchFryOil.Text
LastRow.Offset(1, 9).Value = txtFrSpOil.Text
LastRow.Offset(1, 10).Value = txtBatterOil.Text
LastRow.Offset(1, 11).Value = txtBatterPowder.Text
LastRow.Offset(1, 12).Value = txtFrenchFrySolids.Text
LastRow.Offset(1, 13).Value = txtBatterSolids.Text
LastRow.Offset(1, 14).Value = txtFrSpSolids.Text
LastRow.Offset(1, 15).Value = txtUnFrSpSolids.Text
LastRow.Offset(1, 16).Value = txtBakedSolids.Text

'   <---------Question Area--------->

Unload Me
End Sub

The User Form will be compased of six tabbed pages of input, the above
is from the first page.

I need to know how to write the code to have the LastRow.offset(1,17)
do a calculation based on adding the pounds from the production lines
(Offset 1,3 throught 1,7 above) and dividing by the raw pounds (Offset
1,1 above)

I have tried several things, but I always seem to get an absolute
reference and the next new row has the same result as the previous
existing row.

Thanks for the help in the past, I know this is something I will
probably slap my forehead and so "Dummy!"


-- 
DCSwearingen


------------------------------------------------------------------------
DCSwearingen's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=21506
View this thread: http://www.excelforum.com/showthread.php?threadid=496826

0
12/29/2005 11:04:06 PM
excel.misc 78881 articles. 5 followers. Follow

0 Replies
555 Views

Similar Articles

[PageSpeed] 36

Reply:

Similar Artilces:

Tabebed Forms in Access!!!HELP!
I am trying to design a tabbed form in Access 2007. I have my five tabs named etc....I have inserted fields onto the first tab and for the life of me cannot figure out have to get the fields from the first tabs to not show up on the other tabs!!!!! I want each tab to contain its own fields. How do I do this???? PLEASE HELP ME!!!!!!!!!! Try cutting the controls, and pasting them back on the the correct page. Make sure that the page itself is selected before pasting the control. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Heather Elbert&qu...

Want to change from Admin to User easily
Hi all, I usually run my PC as Administrator which I now know is dangerous, as it can let malware in and play with the system more easily. So I want to create a limited User account instead, but all my settings are under the Admin profile (eg. Quick Launch icons, file associations, and so on). Is there an easy way to migrate these to the User account, so that when I log in as User, my desktop is the same, icons are the same, etc? Thanks for any advice. a wrote: > Hi all, > > I usually run my PC as Administrator which I now know is dangerous, > as it can...

New to User Forms
When I first found this site I was a crazy woman and just about read everthing. Thanks to all you folks who take the time to answer our qurestions. The one thing I cannot get to is a video/tutoraial on forms, the link was provided by somebody as an assist to another question. I loved the videos but was unable to complete the 3 or 4 part series and forgot to make it a favorite. Can anybody point me in the right direction or provide links to other training for starting forms? Thanks! Might have been Debra Dalgleish's site. http://www.contextures.on.ca/xlUserForm01.html Gord...

How do I turn a one-page flyer template into a 1/2 page postcard?
I have a one-page flyer template which I would like to turn into 1/2 page-sized postcard template. Is there a way to reduce, rotate, and shrink to fit the original template so that I could print it as postcards? ...

Users Shared Folders
Hi guys Can someone please put me out of my misery, and save me from spending another day or so wasting my time trying to find the answer. I just took delivery of new server with SBS 2003. Another company installed it for us. They set it up so that when you create a new user it automatically sets up a user folder in "c:\Users Shared Folders" I do not want that to happen there. I NEED it to happen in the D directory. I have read about moving existing folders etc etc. But I dont need to do that cause I have yet to set up the users, but will be shortly. All I want to...

Fetch user login information using JScript
Hi.. I am new to MS CRM. I am trying add custom HTML pages to the CRM which requires the user login information. I would like to know how to go about this and solve my problem Any help regarding this would be appreciated NN, I am not 100% sure of this but could you not just have the page use integrated authentication? Jeff Loucks 888-474-2237 MVP "NN" <NN@discussions.microsoft.com> wrote in message news:0E6BA8D5-2F2D-492B-8CB8-84284D04FF59@microsoft.com... > Hi.. > > I am new to MS CRM. I am trying add custom HTML pages to the CRM which > requires the user...

Determining size of "autosized" user control
Given a user control that contains some kind of dynamic content (content I do not know the dimensions of at compilation time). This user control is then dropped into a Window, without specifying size. I am trying to determine the size of the content at runtime once it is defined. Take the following sample code: /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { public Window1() { InitializeComponent(); MyUserControl ctrl = new MyUserControl(); ...

Users not showing up All Users
Exchange 2k3 on a SBS 2k3 box. I went in through AD Users+Computers, and created mailboxes for users. Two days later, the mailboxes still don't show up in Exchange System Admin-Recipients-All Addresses-All Users. As a matter of fact, the mailboxes aren't showing anywhere, and we're not able to send mail internally(external isn't a factor yet, as the box hasn't gone live). Strange part is, is that if I right click on All Users-Properties, then click on the Preview button under the General tab, all of the users+mailboxes show up. Is this normal? And on a second note...wha...

2002 with sp-2 hangs when opening attachments
Outlook 2002 with sp-2 hangs when opening attachments sent from earlier version of Outlook. Works fine if sent from other software. Ideas? ...

MDE problems gone.
I have been writing a program in 2007 for 2003 on Windows 7 I don't know what happened. The MDE worked fine I had a laundry list of bugs in the so much so I gave up on the MDE thing and kept working. Much later I compiled the program again and - IT WORKED PERFECTLY. It is good practice to do a save and compile often when writing code. For some of us it becomes such a habit that we do a compile every time we add or edit a line of code. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "Avid Fan" <me@privacy.net> wrote in message news:...

interface error #2
Error message displays periodically "Your server administrator has limited the number of items that you can open simultaneously." We are running Outlook 2007 and Excnage 2003 Exchange 2003. Do I have to change settings in Exchange? ...

user breakpoint
I use malloc in a thread,before the thread quit,I use free,cause pop up "user breakpoint called from code at 0x77f7f570" error. Debug output: HEAP[DownTradetrek.exe]: Heap block at 0037B1C8 modified at 0037DA00 past requested size of 2830 I don't know what happen.Thank for your help. "msg_du" <dch1237@msn.com> wrote in message news:uzRWBIO7DHA.1804@TK2MSFTNGP12.phx.gbl... > I use malloc in a thread,before the thread quit,I use free,cause pop up > "user breakpoint called from code at 0x77f7f570" error. > > Debug output: > HEAP[DownTrad...

User shows up 17x under logons under Mailbox
We have an office where all the users are displaying from 12-17 times under logons while everyone else displays only 3 or 4 times. What does this indicate? Does this indicate connections, being dropped then reconnected? TIA Are they running PDA synchronization software? -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "Greg" <Greg@discussions.microsoft.com> wrote in message news:F194F160-CC25-4068-A213-1D13FE73DD8E@microsoft.com... > We have an office where all the users are displaying from 12-17 times > under > logons w...

Problem with SUMPORDUCT formula
I have more info in my other post (Tracking sheet help) & (sumproduct function, Bob P please see tracking sheet help). I'm using this in Sheet 2 (LTC) =IF(D3="","",D3-C3) and this in sheet 3 (OTP) =SUMPRODUCT(--(LEFT(LTC!$F$3:$F$192,4)=OTP!A8),--(LTC!$E$3:$E$192<=--"0:10"),--(LTC!$E$3:$E$192<>"")) =SUMPRODUCT(--(LEFT(LTC!$F$3:$F$192,4)=OTP!A8),--(LTC!$E$3:$E$192>=--"0:10"),--(LTC!$E$3:$E$192<>"")) I"m counting vehicles that pass a location. Sheet 2 (LTC) column C is the time they are scheduled ...

Need User Name and Password
Hello Everyone, I am reinstalling RMS 1.3 in a customer that their server crashed and need to reinstall everything from scratch... I do not remember the default user name and password for RMS 1.3.; I remember that is a number 1 or 2 (I think) but do not remember the password! Thanks for your Help in Advance Rommel J Jimenez try Password or password if that doesn't work, look it up with the sql statement: select * from cashier "Rommel J. Jimenez" wrote: > Hello Everyone, > > I am reinstalling RMS 1.3 in a customer that their server crashed and need > to r...

Text size #2
Hello friends, is there a way to change the default text size and the font for the incoming emails in OutlookXP, the email format is set to HTML with Word as the email editor. Appreciate your help. Thanks. ...

Best method to allow two users to make edits to the same Excel File
I am trying to determine what is the best method to allow two users to simultaneously make edits to the same Excel file. It is VERY rare that we will ever be typing in the same Cell as the other person, but we both need to work out of the same workbook at the same time. We are working in two separate locations, by the way. Is using Dropbox along with "Tools > Share Workbook" the way to go? Or should I use Google Docs? Or possibly Sharepoint? Or Excel 2010 Web Aps? The main question I am trying to answer is "what actually works" and is generally hassle free. Thanks fo...

Problem with Retail Realm Price Matrix
hey everyone, we have a cash and carry store and we installed RR Customer price matrix(CPM) with RMS. the problem is as soon as we install CPM our transaction screen becomes very slow especially when there are more than 15 items in the transaction which in our case is always. does anybody else had the same problem with this utilitie and how did they solve this problem. thank you in advance I have not used this addon but have you tried contacting Retail Realm to see what they say? Rob "Shoby" <Shoby@discussions.microsoft.com> wrote in message news:B35243EC-6C05...

Random Users Calendars not viewable
We recently moved our Exchange 2003 server to another machine. Since doing so, we have random users whose calendar will only apear as \\\\\\ when we try to invite them to a meeting. I have tried to replicate the Schedule+ Free Busy folder but this has not worked either. Any suggestions? On Tue, 12 Sep 2006 04:32:01 -0700, Kevin <Kevin@discussions.microsoft.com> wrote: >We recently moved our Exchange 2003 server to another machine. Since doing >so, we have random users whose calendar will only apear as \\\\\\ when we >try to invite them to a meeting. I have tried to...

Change Print Form
Anyone know how to change the format of the Case that prints out? Example, I'd liek to add my Compnay Logo to and a signature line so we can print the case prior to going to the client site and provide a copy of the Case for thier records as well as get sign off of the work being completed. As far as I know you have to use reports to customize prints. But if anyone knows how to change the standard printouts (for me for orders etc.)? Greetings, Wolfgang. "Jclark" wrote: > Anyone know how to change the format of the Case that prints out? Example, > I'd liek to...

Form Colors on a form change on a laptop pc
When one of our users prints his Expense Report (an Excel form), it prints in blue ink and he would like it changed to black. Previously, the color of the lines was set to automatic. I changed the color to black and it still prints blue for him. Is there a setting on his pc that is doing this and could I override it by making a change to the Excel file? Thanks. -- akkrug Sounds to me like he's running out of blank ink. ************ Anne Troy www.OfficeArticles.com "akkrug" <kenneth.krug@uticanational.com> wrote in message news:B6C284E0-28A4-42E7-88C1-C069513FEF...

Manager grayed out on user setup
After adding a user, I want to change the manager (which is blank at the moment) but the manager field is grayed out, as a result, I can't change this field. Any suggestions? On the users detail form, go to the Actions menu. There will be an option there to change the manager. Matt Parks MVP - Microsoft CRM ---------------------------------------- ---------------------------------------- On Thu, 13 Jan 2005 07:37:07 -0800, idtpes <idtpes@discussions.microsoft.com> wrote: After adding a user, I want to change the manager (which is blank at the moment) but the manager field ...

problem inserting photo in publisher
when i insert photo from file the photo is blank in publisher Based on Publisher 2000; I'd look at View, Picture display and/or Control Panel Display, Settings, Advanced, Troubleshoot tab, and lower the acceleration setting. -- Don Vancouver USA "jj" <jj@discussions.microsoft.com> wrote in message news:8B473DE7-5794-409E-821B-0B0BD18A8E10@microsoft.com... > when i insert photo from file the photo is blank in publisher How are you inserting the photo? -- JoAnn Paules MVP Microsoft [Publisher] "jj" <jj@discussions.microsoft.com> wrote in ...

Problem opening a Dialog
Hi, Im trying to develop a Dialog based application. I have some buttons and when I hit a certain button I'd like to show a certain dialog. For every dialog that I want to open I have a variable CDialogN m_DialogN And use the DoModal method. Some dialogs give me a problem. When I close application without opening any dialog I got a "memory error" (memory can't be "read"). If I try to open the dialog I got a Debug assertion failed (line 52). The problem must be in deallocation the class resources but those classes are like the others and I didn't have this p...

strikethrough #2
I want to mark a word that has been/needs to be replaced, so I want to put a line through it. You will need to literally draw a line thru it. -- JoAnn Paules MVP Microsoft [Publisher] "katwalkers" <katwalkers@discussions.microsoft.com> wrote in message news:B5616AD1-233A-47B0-85EB-32D620FFE4DB@microsoft.com... >I want to mark a word that has been/needs to be replaced, so I want to put >a > line through it. ...