Reputation: 303 Architect
- Active Posts:
- 1,802 (0.86 per day)
- 26-March 09
- Profile Views:
- Last Active:
- 33 minutes ago
- Viewing Forum: VB6
- OS Preference:
- Who Cares
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Who Cares
- Dream Kudos:
- Expert In:
Posts I've Made
Posted 4 Dec 2014It might be useful to someone if you could tell us which line the error occurs on and what CPrintTvw is (is it a third party control? something you've written? A separate class?)
The error is saying that you're trying to access a property or method of CPrintTvw that doesn't exist and the line that's highlighted will tell you exactly which one it is.
Posted 24 Nov 2014Please try to use code tags as described in the background of the post window.
This is VB.Net code, not VB6.
You say you've been trying for hours and you talk about an input box in your code, but I don't see anywhere that you have an input box, just a few variables defined?
You need a simple loop to capture the income for the number of employees.
For each entry, sum up the income to keep a total.
After all entries have been made, the average is the (total/number of employees).
There are tutorials in the VB.Net section that should assist in the basics such as loops if you're unfamiliar.
Posted 24 Nov 2014You're trying to use the scrollbar value to set the colour for the chart.
Have you tried debugging to see what the scrollbar value is at the point you're trying to set it??
What limits have you set on your scrollbar?
Just to satisfy your own mind, in the immediate window, type "? vbgreen" and press enter. This will give you the value related to the vbGreen constant and give you an idea on the size of the numbers you need to be working with. I believe the backcolour will take an RGB value, giving you up to 16million combinations, so maybe a scrollbar isn't a good example unless you're going to set your limits and intervals accordingly.
Posted 24 Nov 2014Define your scroll bar properties outside of the Change event.
In the change event, make the change to the y-axis of your chart.
Something like below
Sub ScrollBar1_Change() 'I'm not clued up in VBA, so you need to figure out what the Chart property is you need to change!!! Chart.Yaxis = ScrollBar1.Value End Sub
Posted 22 Nov 2014The opening in notepad is a simple one to change.
Right click on any VBP file, select "Open With" from the context menu, then "Choose Default Program" from the submenu.
Now select VB as your default program and that should fix that. It's a windows thing, not a vb thing, because you opened in notepad and let it change the default program (there is a checkbox when doing that).
All I can suggest about the VB5 thing is ensure you're running the same service packs as your previous installation.
- Member Title:
- D.I.C Lover
- 43 years old
- June 12, 1971
- Programming Languages:
- C#, VB
- Website URL: