|
hi,
i had a problem in VBA, and i really hope you guys is able to help mi.
i'm creating a simple system using VBA in excel, therefore i'm using the sheets as my DB. how am i suppose to call the things i wan.
2nd question
how am i suppose to link the data list or list box with the sheets.
Thanks really hope to hear from you guys thanks
Best Regards
Veon cheng
|
|
|
|
|
veon cheng wrote: how am i suppose to call the things i wan.
I see you meant to type 'want', and that's cool. We all make typos. But, I still can't work out what on earth you may be asking for. I don't do VBA, but I doubt anyone who did, could answer you either, for this reason. Perhaps you need to explain more.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hi
sorry about the "wan" thingy. hmm ok i'm creating a form in excel where the form is able to let the user to select the start date and end date of the report to be generated. therefore i need to know the code that is able to call the data from an excel sheet to get the figure as well as items in the excel sheet. where i want to use the excel sheet as a DB. how?
thanks
Veon
|
|
|
|
|
there are objects that allow you to look at the various sheets and reference them by name etc.
One of the best things to do, is record a macro and perform a number of operations e.g. move around sheets, changing values in cells etc.
Then look at the code that is recorded.
The object browser will also help you identify the various objects and methods that can be called.
|
|
|
|
|
Hi to all,
I am a VC++ learner. I am having a tough time to understand the concepts/basics/ needs of ATL, COM ...
is it releted to only VC++?..or its like a concept, something to do with all the languages.
Please give an idea on it....ATL and COM
regards and thanks
hrishi
-----------------------------
I am a beginner
|
|
|
|
|
Two possibilities here.
The first is that you can't tell the differences between Visual Basic and C++, in which case, ironically, VB is probably more the language for you The second is that you rudely spammed the whole site.
In either case, it's plain you ask without trying to do any research yourself. A .NET app can use COM. ATL is a template library for generating COM objects, and is C++ only, but it's just a tool, COM is the end result. .NET programmers only create COM objects if they need to talk to VC++.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello Everybody,
Had Set vb-hourglass Cursor in my application.For user to wait until the process is completed.The problem is that when run the app the Cursor Some times changes to vb-hourglass and some times doesn't.I used Me.Mouse-pointer and even Screen.Mouse-pointer set to vb-hourglass. But yet the problem exist.Can anyone Provide solution to the prob and Why does it Happen?
Thanks in Advance.
|
|
|
|
|
Better use Me.Cursor = Cursors.WaitCursor and then later Me.Cursor = Cursors.Default to set it back.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hello Johan Hakkesteegt,
Thanks for your reply. But Me.Cursor=Cursors.WaitCursor this code is not supportted by Vb6.Can u Provide any other way to achieve it.
|
|
|
|
|
I am sorry, but VB6 is not supported anymore in general. I have not used it for years. If at all possible try to use VB.NET instead.
My advice is free, and you may get what you paid for.
|
|
|
|
|
hi,
Is there a way to use BitBlt in order to find if
a specific BMP file is inside another ?
for example:
If I have Bitmap1.Bmp which is a small file
and Bitmap2.Bmp which is bigger,
can i find out if the picture inside Bitmap1 is
also inside Bitmap2 ?
Thanks in advance.
|
|
|
|
|
No - that is not even remotely what BitBlt does. You'd have to examine the bits of the bigger file, to see if you can find the bits of the smaller file inside it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Currently I am doing that by tring to find a line of pixels which are the top row of the smaller file
inside the bigger file and if i find it i compare the rest pixel lines.
i was told there is a simpler way to do that.
if anyone knows of such way, please write it down.
Thanks.
|
|
|
|
|
Kobi_Z wrote: i was told there is a simpler way to do that.
I've been told lots of things too. It's possible that you could use BitBlt operations to merge two identical bitmaps and end up with one that's all black or all white, but you want to find a bitmap in a SECTION of another, which kills even that idea. You're stuck. Read my image processing articles for ideas on how to most quickly compare images. You will need to use C#, VB only writes slow imaging code.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
imho an efficienty pattern findign algorithm would be your best choice. using bitblt is like using the worst pattern finding solution ever
ofcourse you might want to aviod using GetPixel(). Heres a class, use this (unfortunately i cant give proper credit to the author):
-Load your bitmap;
-Create a fast bitmap.
-copy your loaded bitmap into fast bitmap (instanicate a graphics over it and use drawimage)
-you have a simple array of bites in the fast bitmap (bits). expose it and use with an efficient pattern finder.
public class FastBitmapEditor
{
public int Height;
public int Width;
public Bitmap bitmap;
byte[] bits;
GCHandle handle;
int stride;
int pixelFormatSize;
public FastBitmapEditor(int width, int height)
{
Width = width;
Height = height;
PixelFormat format = PixelFormat.Format32bppArgb;
pixelFormatSize = Image.GetPixelFormatSize(format) / 8;
stride = width * pixelFormatSize;
bits = new byte[stride * height];
handle = GCHandle.Alloc(bits, GCHandleType.Pinned);
IntPtr pointer = Marshal.UnsafeAddrOfPinnedArrayElement(bits, 0);
bitmap = new Bitmap(width, height, stride, format, pointer);
}
public Color GetPixel(int x, int y)
{
int blue = bits[(y * Width + x) * 4];
int green = bits[(y * Width + x) * 4 + 1];
int red = bits[(y * Width + x) * 4 + 2];
int alpha = bits[(y * Width + x) * 4 + 3];
return Color.FromArgb(alpha, red, green, blue);
}
}
|
|
|
|
|
Hello !
Is there any kind of algorithm that will calculate how many rectangles can if in one big rectangle ?
I have following problem: have big rectangle, and then many smaller rectangles. I need to fit as much rectangles as it is possible in the big one.
Can anyone help ?
Btw, I was trying to make something myselft, but I only came out with recursive solution, and I think that it will be too slow (especially when you have maaaaany rectangles).
Thanks
|
|
|
|
|
You might get a better answer in the Algorithms forum. But I would personally iterate from 0 to srcRect.Width, and iterate inside that from 0 to srcRect.Height. If the two iteration variables aren't equal, then add it to the list. That'll account for different sizes. You could loop again, through each item in the list to take different positions and the same size into account.
The problem I can think of is that this would be extremely slow.
|
|
|
|
|
hehe, that's kind of what I've thought of Thanks anyway
|
|
|
|
|
I can't offer you a ready made solution but I figured out a little function that may at least help you out: Round a number to a multiple of another number[^]
It would only give you a one-dimensional solution, but someone posted a reply to my article, saying that they used it in a grid calculation.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Thanks for reply, I'll look into that
|
|
|
|
|
we had to write a cut optimisation software once. I can't give you any detailed code but i can remember that you have to sort your small rectangles by size and the try to fit in the biggest piece first.
You may find something useful if you google for 'cut optimisation'.
Tosch
|
|
|
|
|
Yea, that's what I'm writing ... Cut optimization software Thanks for suggestion for google search, I'll try it
|
|
|
|
|
|
Thanks, I'll read it
|
|
|
|
|
Hi all.
in my app i have to load one or two million of strings from the database to an array.
after loading i close the database connection.
i run a FOR loop and load the array
but memory reaches 125 MB
how to make it low?
TheMrProgrammer
http://www.icbse.com/2009/funny-exam-answers-school-students
http://download.cnet.com/TheCalcMan/3000-2094_4-10958266.html
|
|
|
|