Home |
Search |
Today's Posts |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Glad you got it working...
Minitman wrote: Hey Dave, Yes I remember now, I could not use it because there was no way to tell it where to place the letter Y. I am using this UserForm to fill in 132 sheets and the determining factor as to which sheet is selected, is the Deposit Date (sheet tabs are labeled as dates in the mmm-yy format). It is placed on the last row of column L. It was easier to do the placement of all of the data when the form was filled out. It was working very well, until I got to tweaking it!!! But that will be the subject of my next cry for help. <G -Minitman On Wed, 27 Oct 2004 08:22:49 -0500, Dave Peterson wrote: This is the code that Tom sent on the Oct 26: Private Sub cbx1_click() if cbx1.Value then worksheets("Sheet1").Range("A1").Value = "Y" else worksheets("Sheet1").Range("A1").ClearContents end if end Sub I use Netscape Messenger for my newsreader. From your headers, I see you use Forte Agent. Tom's post is in the middle of this thread for me. But glad you got it working. Minitman wrote: Hey Dave, Thanks, this looks like it will do the job. As for the code from Tom, he did indeed sent this portion: Dim dt As Date Dim sh As Worksheet dt = CDate(TextBox1.Text) Set sh = Worksheets(Format(dt, "mmm-yy")) I believe Tom sent it on Thu, 21 Oct 2004. It is part of the last element of my UserForm (the Save button), the offset part someone helped me with last year sometime. A lot of Tom's code is woven though-out my projects as well as the work of many others/ In fact this NG has been very helpful in my attempt at programming (I am not a programmer, only a wanna be<g). With all of your help, I have finished this project and can now start to enter in the last 11 years of bank deposits. My next project is to finish a Income projection workbook which I have been working on since 1988 (started in Quartro Pro). I have learned so much from this NG that I now can totally rewrite this project. Again, my deepest thanks to all of you who so unselfishly give of your time and knowledge to those of us who really don't have a clue. <G -Minitman On Tue, 26 Oct 2004 21:09:55 -0500, Dave Peterson wrote: .Offset(0, 11).Value = CBX1.Value <<<<<< could become: if cbx1.value = true then .Offset(0, 11).Value = "y" else .offset(0,11).value = "n" end if But looking back through the older posts, this looks a lot like the code that Tom originally posted. Minitman wrote: Ok, here is the short version Private Sub SaveButton_Click() Dim dt As Date Dim sh As Worksheet dt = CDate(TextBox1.Text) Set sh = Worksheets(Format(dt, "mmm-yy")) sh.Activate With Range("A65536").End(xlUp).Offset(1, 0) .Value = TextBox1.Text .Offset(0, 1).Value = TextBox2.Text .Offset(0, 2).Value = CBox1.Text .Offset(0, 3).Value = CBox2.Text . . . .Offset(0, 10).Value = TextBox6.Text .Offset(0, 11).Value = CBX1.Value <<<<<< .Offset(0, 12).Value = TextBox7.Text . . . .Offset(0, 16).Value = TextBox14.Text End With End Sub The dots indicate more of the same. Thanks for looking at it. -Minitman On Tue, 26 Oct 2004 19:58:04 -0400, "Tom Ogilvy" wrote: If, by paste down, you mean you have set the controlsource property to a cell, then the value in that cell will be True or False. It will only be blank if no selection has been made. You can not make the cell contain "Y" or anything else by using the controlsource property. Otherwise, you will have to show what code you are using (that demonstrates the terminology paste down) that makes it more complicated than that. -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you assess the state of a form-checkbox in a logic statemen | Excel Worksheet Functions | |||
replace state names with state code abbreviations | Excel Worksheet Functions | |||
How can I show state-by-state data (as silos) on a map of NA | Charts and Charting in Excel | |||
Converting State Names to State Abbreviations | Excel Discussion (Misc queries) | |||
testing the state of a checkbox in vba code | Excel Programming |