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...
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...
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...
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
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...
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...
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?
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...
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!
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
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>...
Or This:
Sub Try()
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Dim xlWS As Excel.Worksheet
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlWB = xlApp.Workbooks.Add ' create a new workbook
'or
'Set xlWB =...
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("Excel.Application")
xlApp.Visible = True
Set xlWB = xlApp.Workbooks.Add ' create a new workbook...
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("E1").Select
ActiveCell.FormulaR1C1 = "=R" & Y & "C[-2]"...
Sub Macro1()
Dim Counter As Integer
Dim Y As Integer
Counter = 1
Y = Counter * 2999
If (Counter < 5) Then
Range("E1").Select
ActiveCell.FormulaR1C1 = "=R[" & Y & "]C[-2]"
Range("F1").Select
ActiveCell.FormulaR1C1 = "=R[" & Y &...
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
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.