Aquiring a webcam image using VBA

diddi

Well-known Member
Joined
May 20, 2004
Messages
3,337
Office Version
  1. 2010
Platform
  1. Windows
Greets all,
i am trying to grab an image from a webcam (and ultimately an ultrasound scanner) with the user clicking a single button to aquire the image. i am guessing that i need to find a simple app that can take the snapshot and then control it using WinAPI, but im out of my depth a bit when it comes to API. if anyone has some thoughts or can point me towards a resource id be most grateful.
thx
 
Code:
... As an example, however we may moan about Microsoft at times, they would not have succeeded if they produced rubbish.
 ...[/QUOTE]
(apologies in advance for digressing)
  I am sorry that I have to disagree with you completely my friend.
   
  The first computer that I ever saw was in 1961 at my Dad's telephone office; a giant machine with punched cards.
   
  The next computer that I saw and used was an IBM 360 in 1971.
   
  ... a brief intermission ...
   
  Then  a PET Computer mid 70's and from then on until today, I have used computers from many manufacturers including Cray Research, Silicon Graphics and hundreds of other vendors along with many, many different operating systems and tons of software.
   
  Having used other OS's and remembering that when PC DOS 1.0 was introduced that it was remarkably similar to CP/M (which I didn't know at the time) and it also had a crappy rendition of BASIC called BASICA.


 I couldn't help think to myself that this little toy OS will never make it. It was too inefficient, too lame, too sparse and goofy.
   
  Microsoft represents the largest enigma of my life. How did the company that makes the shoddiest, most inconsistent, bug ridden programs become the premier software vendor on the planet? 



Bill Gates. A talented man with 160 IQ that is the world's Best Snake Oil Salesman and at the same time one of the worst Software Architects on the planet.
   
  Case in point:
  The year is 1993. Steve Jobs is in charge of a little company called NeXT. They have just released NeXTSTEP Release 3.
   
  Still to this day, I still consider that OS to be the finest piece of software ever written on this planet; there is not one day that goes by that I don't wish I still had the ability to use it every day.
   
See for yourself. Please remember the year is 1993!

  NeXTSTEP Release 3.
  [URL]http://www.youtube.com/watch?v=j02b8Fuz73A[/URL]
  

now the pile of crap. 

  windows 3.1
  [URL]http://www.youtube.com/watch?v=GgBRAPo7v8s[/URL]
   
  This picture says it all! 
   
  Two competing OS's from the same period. 
  The Inferior OS (the pile of crap) is running INSIDE the Superior one as a sub process, yet the INFERIOR one (again the pile of crap) got the 
  most market share and became the dominant one.
   
  [URL]http://erik.doernenburg.com/wp-content/uploads/2008/12/nextstep.png[/URL]
   
  NeXTSTEP was ported to Intel Machines as OPENSTEP
  [URL]http://farm2.static.flickr.com/1022/811273230_77fa6dd06b.jpg[/URL]
   
  Every day, I have something that I have to fix or tweak or redo in the Windows environment with programs that are HORRIBLE when it comes to workflow; never remembering the last thing I did just in case that I would be repeating a similar operation like uploading pictures to a website and I want it see the THUMBNAILS instead of the stupid Icons! I either use Details or Thumbs NOTHING else!
   
  Microsoft is full of annoyances, plain and simple;  they do NOT write / create the BEST software, they just happen to SELL  the most software.


Think  of it like this. Almost anyone on the planet, unless they are a Moron,  can make a better hamburger than McDonalds can. But very few people can  SELL as many hamburgrs as McDonalds.


Microsoft is the "McDonalds" of Software!
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
2iddi:

Hi!

I found this very interesting thread of yours, posted back in 2010.
"Aquiring a webcam image using VBA"

I am currently working on a project where we will be filling validation test forms on Excel and I need to be able to add pictures/videos to the possible comments.

I would like to test the way you did it with the X360 VideoCapture ActiveX Control.

I am not a programmer but I have some skills in google search and putting things together... So I have good hope I will manage it that way. I wanted to know if I could ask you some questions if I come to a point that I can't handle it alone?

As I see you are still active on this forum, so I would like to be able to count on you as support!

Do you still have somewhere a piece of code where you were using the ActiveX control? This would be a great help for me, accelerating my work, seeing how I should use it.

Thank you for you future possible help!

Best regards and greetings from Finland,

Le Diplomate

P.S.: Your mailbox is full therefore I can't contact you directly. I hope you will see this message, else I will be forced to be off topic on an other thread.
 
Last edited:
Upvote 0
hi and welcome to the board. I have now emptied my mail box :biggrin:
the code is still operational today in a program for a rental car company. it is used for capping driver licences and has been a very useful addition. it does have video capability but I have not explored that side of it.

this was an "interesting" thread indead! and i observe that the poster who made the complaint never provided a solution LOL
 
Upvote 0
Hi!

It's me again. The Picture capture works finally fine. Exactly as expected. However the Video capture makes Excel crash. Did you try it?

I tried exactly what is in the help.

Code:
 Private Sub CommandButton3_Click()
    'Start Video Capture
    VideoCapture1.SetOutputFile ("c:\output.avi")
    VideoCapture1.Capture
    VideoCapture.SetOutputFileVideoSize 320, 240
End Sub
Private Sub CommandButton4_Click()
    'Stop Video Capture
    VideoCapture1.StopCapture
End Sub

Pushing the Button 3 makes Crash Excel. I tried without setting any resolution, same thing.

Any idea?

(Windows 7, Logitech HD Webcam C525, Excel 2007)

Best regards,

Le Diplomate
 
Upvote 0
It still doesn't work.
I guess it's some compatibility problem or so. No idea...

Has someone maybe an Idea for another solution/ActiveX Control/software to do a test report including photos and/or video?
 
Upvote 0
I finally used another ActiveX Control: Video CapX, since X360soft seems not to provide support anymore. They are quite similar.

I finally managed to do everything I wanted.

Fine. :)
 
Last edited:
Upvote 0
I finally used another ActiveX Control: Video CapX, since X360soft seems not to provide support anymore. They are quite similar.

I finally managed to do everything I wanted.

Fine. :)

Hi,

would it be possible to publish or email a working solution for this?
A few colleagues asked me to create an excel-based take-on sheet for new staff, being able to import pictures from a webcam would be a very useful feature.
You can contact me at nick[at]wasteplan[dot]co[dot]za. Thanks!
 
Last edited:
Upvote 0
x360 works for still capture OK. and is running under Win7.
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,667
Members
449,462
Latest member
Chislobog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top