Hi.
I know this issue isn't VB6, but as VBA is close to VB6 I thought of giving it a try.
I'm trying to create a bitmap in Excel-VBA.
Right now I'm working with shapes created on a worksheet, copy a picture of the shapes and assign it to my userform (the code is mainly taken from the internet)
This works, but is very slow if the number of shapes increases, right now I have a max. of 4700 shapes to handle at once :(
For a speed boost I think creating the bitmap completely in memory would do the trick.
But wasn't able to find a really helpful how-to.
What I thought of:
The code for getting the image from clipboard is already in use.
But can someone point me to a piece of code from VB6 which shows how this memory-painting can be done?
I think porting it from VB6 to VBA should be no problem at all.
Any help is appreciated!
Michi
I know this issue isn't VB6, but as VBA is close to VB6 I thought of giving it a try.
I'm trying to create a bitmap in Excel-VBA.
Right now I'm working with shapes created on a worksheet, copy a picture of the shapes and assign it to my userform (the code is mainly taken from the internet)
This works, but is very slow if the number of shapes increases, right now I have a max. of 4700 shapes to handle at once :(
For a speed boost I think creating the bitmap completely in memory would do the trick.
But wasn't able to find a really helpful how-to.
What I thought of:
- Create bitmap of defined size in memory
- Draw coloured rectangles with coloured borders to this bitmap (or single coloured points, if rectangles aren't possible)
- Copy this image to the clipboard
The code for getting the image from clipboard is already in use.
But can someone point me to a piece of code from VB6 which shows how this memory-painting can be done?
I think porting it from VB6 to VBA should be no problem at all.
Any help is appreciated!
Michi