Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Yesuslave

    Class instances with unique implamentation

    John, I see what you mean. I guess since they took out the concept of multiple inherritance, the need for interfaces has become aparent to some people. I'm still wondering what the difference is between declaring a method in an interface and then importing that interface (and having to define...
  2. Yesuslave

    Class instances with unique implamentation

    If there was only one Police Car type, that would be true. But the whole point of this thread is that there will only be one instance of each class, so PoliceCarZ28 would be instantiated once (inherriting from Z28, inherriting from Car) and PoliceCarCV would be instantiated once (inherriting...
  3. Yesuslave

    Class instances with unique implamentation

    I was only giving an example of how you can inherrit from more than one class without using an interface. I'm not a particular fan of interfaces, as I so far haven't really seen their usefulness in my own programming. I get that they help you to create a uniform way of calling a method...
  4. Yesuslave

    Class instances with unique implamentation

    Actually, they can be intermediate classes. If you implament it that the Z28 inherrits the Car class, and then the PoliceCar inherrits the Z28 class. That's what I meant by intermediate classes. Class Car End class Class Z28 Inherrits Car End class Class PoliceCar Inherrits Z28 End Class
  5. Yesuslave

    Class instances with unique implamentation

    John... I see your point with "class" and "type." I will very likely have only one "type" of PoliceCar and only one Instance of Police Car. This is why it seemed somewhat wasteful to me. To have a class for each slightly different car which only gets instantiated once seems a bit wasteful...
  6. Yesuslave

    Class instances with unique implamentation

    OK, I assumed that I would have to implament a class for every different type. The problem is that it just seems wasteful, as each unique object will only be instantiated once. There will be a large number of just ordinary cars, but (for argument's sake) there will only be one SpyCar, one...
  7. Yesuslave

    Class instances with unique implamentation

    So, bascially, for every object I create, if its implamentation is even slightly different, I need a new class? Therefore, if I had 50 cars, and each car had all of the same features except how to turn the lights on, I would need 50 different classes?
  8. Yesuslave

    Class instances with unique implamentation

    Hi all, OK, I'm trying to find out whether or not this is possible. What I want to do is have a general class where a basic list of methods are predefined, let's say "Car." Car will have the "Start" method, the "Accelerate" method, and the "Turn lights on" method. Now, I want all instances...
  9. Yesuslave

    Passing Multiple Arguments to Function

    Hey, Ok, I'm dumb...lol... the things you put as [ red ] and [ /red ] appeared in the html, but when I viewed them in my reply, they didn't...so I just took them out of your code, and viola! It works! Thanks very much!
  10. Yesuslave

    Passing Multiple Arguments to Function

    Hmmm...that doesn't seem to work. What is the whole ... thing about? as well, there is no closing bracket on the first "red", is that supposed to be that way? I tried it with a closing bracket and without, and neither works. Thanks, Joshua
  11. Yesuslave

    Passing Multiple Arguments to Function

    Hi all, Not sure why this code doesn't work, but when I set up multiple arguments in a VBScript Function, it ceases to work. I've tested both arguments individually, and they work find. When in conjunction, though, I get no response. Thanks for the help before hand! Joshua <html> <body>...
  12. Yesuslave

    Populate Excel database from a word form

    Or This: Sub Try() Dim xlApp As Excel.Application Dim xlWB As Excel.Workbook Dim xlWS As Excel.Worksheet Set xlApp = CreateObject(&quot;Excel.Application&quot;) xlApp.Visible = True Set xlWB = xlApp.Workbooks.Add ' create a new workbook 'or 'Set xlWB =...
  13. Yesuslave

    Working with data in Excel

    Blah, messed that, up, but hopefully you get the idea.
  14. Yesuslave

    Populate Excel database from a word form

    Try this, and let me know if you need something adjusted... Sub Try() Dim xlApp As Excel.Application Dim xlWB As Excel.Workbook Dim xlWS As Excel.Worksheet Set xlApp = CreateObject(&quot;Excel.Application&quot;) xlApp.Visible = True Set xlWB = xlApp.Workbooks.Add ' create a new workbook...
  15. Yesuslave

    Working with data in Excel

    Instead of a do until loop, you can also use the For Next loop as well. Like this: Sub Macro1() Dim Counter As Integer Dim Y As Integer Counter = 1 Y = Counter * 2999 For i = 1 to 5 Range(&quot;E1&quot;).Select ActiveCell.FormulaR1C1 = &quot;=R&quot; & Y & &quot;C[-2]&quot...
  16. Yesuslave

    Working with data in Excel

    By making the loop run until its out of data lines, do you mean until it finds a cell where there is no data, or that it runs 5 times and that is all?
  17. Yesuslave

    Working with data in Excel

    Sub Macro1() Dim Counter As Integer Dim Y As Integer Counter = 1 Y = Counter * 2999 If (Counter < 5) Then Range(&quot;E1&quot;).Select ActiveCell.FormulaR1C1 = &quot;=R[&quot; & Y & &quot;]C[-2]&quot; Range(&quot;F1&quot;).Select ActiveCell.FormulaR1C1 = &quot;=R[&quot; & Y &...
  18. Yesuslave

    Loop to find if a date exists in a range of dates

    You will be adding new date ranges to which column?
  19. Yesuslave

    Amend VBA by using different VBA

    Sounds to me like you need a simple .exe file. However, since VBA doesn't produce these, I'm at a loss. If you have the regular VB developer's environment, then you should be able to produce a simple executable that could do this. Sorry I couldn't be more help, Joshua Wise
  20. Yesuslave

    Password protected command button

    Hi, This depends on how secure you want the password to be. If you feel sure enough that the person pushing the button won't be able to open the macro and look at it, you can simply do a compare between a preset variable and the text entered in a pop-up box triggered by the button push. Not...

Part and Inventory Search

Back
Top