Notices
ECU Flash

Any of you a genius at Excel Macros and Visual Basic??

Thread Tools
 
Search this Thread
 
Old Jun 22, 2010 | 07:03 AM
  #16  
Jack_of_Trades's Avatar
Thread Starter
Evolved Member
iTrader: (17)
 
Joined: Jun 2007
Posts: 3,523
Likes: 2
From: Opelika,AL
eXtreme-Speed actuay hooked me up with it but I will DEFINITELY hit you up if we hit a snag. Find way to copy a cell range (a2:q28) to the clipboard, then save it to the desktop as a jpeg. That's a doozy!
Reply
Old Jun 22, 2010 | 08:28 AM
  #17  
Acree's Avatar
Evolved Member
15 Year Member
Photogenic
Photoriffic
Shutterbug
iTrader: (8)
 
Joined: Nov 2006
Posts: 787
Likes: 1
From: Dallas
Here ya go.

When the user clicks the button, a dialogue opens requesting the user input a range. A2:Q28 is the default range already entered, so you can simply click OK. If you don't want the user to be able to select the area, let me know and I can make that happen in a few lines.

After that, a "Save as" dialogue opens requesting the user input a filename to save the image. The default will always be the date. When the user clicks save, there is now a bitmap in the directory they selected.

If you HAVE to have a jpeg, let me know. It's a little more difficult. At the current time, it can only save as bitmap.


It's currently uploaded here on Google Docs.

Shoot me your email so if you have problems on google docs and I can send it to you. It's too large to upload on the forums.

-Acree
Reply
Old Jun 22, 2010 | 08:38 AM
  #18  
Jack_of_Trades's Avatar
Thread Starter
Evolved Member
iTrader: (17)
 
Joined: Jun 2007
Posts: 3,523
Likes: 2
From: Opelika,AL
Yeah, we can do the bitmap thing already but we need it to be a jpeg cuz some forums can't display bitmaps and such :/

the range is locked so the range doesn't need to be user defined. If you could have the filename be the date plus an adder value so they could paste one every second without duplicates, that'd be killer!

Thanks for helping!!!!!!
Reply
Old Jun 22, 2010 | 11:44 AM
  #19  
Acree's Avatar
Evolved Member
15 Year Member
Photogenic
Photoriffic
Shutterbug
iTrader: (8)
 
Joined: Nov 2006
Posts: 787
Likes: 1
From: Dallas
That's possible, but the problem is when Excel saves as a .jpg or .jpeg file, it's still the same file size as the bitmap file. They would have to go into MS Paint and resave the file to get the file size down.

-Acree
Reply
Old Jun 22, 2010 | 12:04 PM
  #20  
Jack_of_Trades's Avatar
Thread Starter
Evolved Member
iTrader: (17)
 
Joined: Jun 2007
Posts: 3,523
Likes: 2
From: Opelika,AL
That's fine. Some forums can't displaybit
aps even if it's a link. If users want to share the image, they can uoad it to photobucket or do it the old way with print screen if they need a smaller file to directly upload.
Reply
Old Jun 22, 2010 | 01:18 PM
  #21  
eXtreme-Speed's Avatar
Evolving Member
iTrader: (7)
 
Joined: Jul 2009
Posts: 334
Likes: 2
From: South, NJ
Originally Posted by Acree
That's possible, but the problem is when Excel saves as a .jpg or .jpeg file, it's still the same file size as the bitmap file. They would have to go into MS Paint and resave the file to get the file size down.

-Acree
Acree here is my problem... I have it saving as a jpg. or what ever you would like to save it as in matter of fact. The problem that i am having is that for some reason when you open the image file up it looks like excel will only copy so much of the picture then leave the rest white. Almost like it hit some kind of limit?
I attached what happens below.

Any ideas would be appreciated!
Attached Thumbnails Any of you a genius at Excel Macros and Visual Basic??-testtt.jpg  
Reply
Old Jun 22, 2010 | 01:20 PM
  #22  
Acree's Avatar
Evolved Member
15 Year Member
Photogenic
Photoriffic
Shutterbug
iTrader: (8)
 
Joined: Nov 2006
Posts: 787
Likes: 1
From: Dallas
Ok I've added two buttons.

The first one starts capturing JPG images of A2 through Q28 of the DataLog Entry sheet every second.

When the second button is clicked, the capture stops.

All images are stored in the directory put into R31 in the "User Settings" sheet. You have it locked so I couldn't change anything on that page.

You need to format that page to have an entry for the default directory the user wishes to store the images in. One you know which cell the directory will be stored in, Hit Alt + F11 to bring up the VB editor. Once that is open, double click on "Sheet3 (DataLog Entry)" to open up the code page. Change R31 to which ever cell the directory is in.

Here is the link.

-Acree
Reply
Old Jun 22, 2010 | 01:23 PM
  #23  
Acree's Avatar
Evolved Member
15 Year Member
Photogenic
Photoriffic
Shutterbug
iTrader: (8)
 
Joined: Nov 2006
Posts: 787
Likes: 1
From: Dallas
I'm not sure why it would do that.

Try the latest revision I just posted up. If it's still doing that, then get a copy of the file with the data you're using to me.

-Acree
Reply
Old Jun 22, 2010 | 01:46 PM
  #24  
Jack_of_Trades's Avatar
Thread Starter
Evolved Member
iTrader: (17)
 
Joined: Jun 2007
Posts: 3,523
Likes: 2
From: Opelika,AL
Why would I want to take a snapshot of a stationary object every second?
Reply
Old Jun 22, 2010 | 01:55 PM
  #25  
Acree's Avatar
Evolved Member
15 Year Member
Photogenic
Photoriffic
Shutterbug
iTrader: (8)
 
Joined: Nov 2006
Posts: 787
Likes: 1
From: Dallas
Originally Posted by Jack_of_Trades
the range is locked so the range doesn't need to be user defined. If you could have the filename be the date plus an adder value so they could paste one every second without duplicates, that'd be killer!
Did I miss something?

-Acree
Reply
Old Jun 22, 2010 | 02:01 PM
  #26  
Jack_of_Trades's Avatar
Thread Starter
Evolved Member
iTrader: (17)
 
Joined: Jun 2007
Posts: 3,523
Likes: 2
From: Opelika,AL
my bad,lol. What I meant was....the file name would be todays date,then a different number depending on the time. Something like 2010_6_22_15_58.jpg where 15:58 is the time or something. That way they can take multiple snapshots on the same day without having to overwrite the previous image. Sorry about that.
Reply
Old Jun 22, 2010 | 02:42 PM
  #27  
eXtreme-Speed's Avatar
Evolving Member
iTrader: (7)
 
Joined: Jul 2009
Posts: 334
Likes: 2
From: South, NJ
Already figured out how to do it. Thanks Though
Reply
Old Jun 23, 2010 | 05:33 AM
  #28  
Acree's Avatar
Evolved Member
15 Year Member
Photogenic
Photoriffic
Shutterbug
iTrader: (8)
 
Joined: Nov 2006
Posts: 787
Likes: 1
From: Dallas
Here is more what I think you were looking for. A simple button the user can click to create a jpg. The name is formatted with the date and then the time down to the millisecond, so there's no way an image would ever be overwritten. I also included better Error Handling.

Jack, if you want to get a copy of v6.00 to me, I can help implement the code and possibly throw out some ideas for more macros.

-Acree

Last edited by Acree; Jun 23, 2010 at 05:45 AM.
Reply
Old Jun 23, 2010 | 05:44 AM
  #29  
Jack_of_Trades's Avatar
Thread Starter
Evolved Member
iTrader: (17)
 
Joined: Jun 2007
Posts: 3,523
Likes: 2
From: Opelika,AL
Actually, extreme speed beat you to it last night and it works perfectly. Click the forms button and an open dialog box opens so the user can choose where to save the jpg and it saves it as the day/mth/yr. He had it save to the c: drive but I added a function to find the address to any users desktop. I also added the minutes and seconds to the saved filename. Works like a charm
Reply
Old Jun 23, 2010 | 05:46 AM
  #30  
Acree's Avatar
Evolved Member
15 Year Member
Photogenic
Photoriffic
Shutterbug
iTrader: (8)
 
Joined: Nov 2006
Posts: 787
Likes: 1
From: Dallas


-Acree
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
LancerEVOVIIISD
For Sale - Interior / Exterior / Sound / Styling
2
Jul 15, 2017 04:55 AM
TheoJC
Evo How To Requests / Questions / Tips
1
Feb 7, 2016 05:39 PM
mtoner1825
08+ Lancer Show / Shine
0
Oct 9, 2015 02:55 PM




All times are GMT -7. The time now is 11:38 AM.