473,563 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

crop images in microsoft excel visual basic editor(macro)

9 New Member
Hi,

I am using microsoft excel visual basic editor to write a code.I need to crop up a part of bitmap image. I have seen posts how to do it for a picture box but in this editor there are no picture boxes. There are just image boxes. How do I do this using an image box or is there a way to incorporate picture box in this editor?
May 17 '10 #1
4 5804
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

this is what i got from Macro recording.. try this...

Expand|Select|Wrap|Line Numbers
  1. With ActiveSheet.Shapes(1)
  2.         With .PictureFormat
  3.             .CropLeft = 600
  4.             .CropTop = 1260
  5.             .CropBottom = 100
  6.             .CropRight = 1290.3
  7.         End With
  8.         .Left = 0
  9.         .Top = 0
  10.     End With
  11.  
Regards
Veena
May 17 '10 #2
vb5prgrmr
305 Recognized Expert Contributor
You can add a picture box under more controls, or you can use a stdPicture object (I Think). To test, see if you can declare a variable as a stdPicture. Then use your friends (yahoo, google, ask, answers, bing) on how to use this object. If you cannot declare a variable as stdPicture, sorry to waist your time on that part. GoBack to finding the picture box under more controls...



Good Luck
May 17 '10 #3
atiullah
9 New Member
@vb5prgrmr
@Veena.. Thnks for your reply. I have put an image box in the userform and upload the picture there. I have to crop a portion of this image and save it as another image.How would I be able to do it?


@..vb5prgrmr ..I tried to search picture box in more controls but couldn't find it.Are there picture box controls in microsoft excel visual basic editor?
May 17 '10 #4
vb5prgrmr
305 Recognized Expert Contributor
Weeeellll..... There used to be... or at least I thought there was... But now I wonder if my memory is going as I just checked.... and did not find what I thought I would find.... Hmmmm,... Okay, I give up as I don't use VBA all that much...



Good Luck
May 18 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4221
by: AK | last post by:
I don't want any part of the previous discussion on Visual Basic versus Visual Basic.Net. My query is about using Visual Basic for Applications; and whether it is better to use Visual Basic 6 or Visual Basic.Net as a springboard for studying VBA. I use Office 2000 and would like to use VBA as a tool to customize it. I have zero...
5
2991
by: Aaron Ginn | last post by:
I'm investigating the feasibility of using Python instead of Visual Basic for a commercial software package that I'm planning on developing. Now I'm absolutely a Python zealot. I use it for most of my software development at work where I work in a Solaris environment. To me, Python is the perfect language for most applications in a UNIX...
4
1848
by: Volumstein | last post by:
Hello, I am spoiled coming from programming in word and excel which offer the "record macro" tool that eliminated most basic syntax confusions that I had. unfortunately msaccess doesn't offer that option, and my luck in the groups has yielded little results for manipulating tables via vb code in a form. Could anyone illustrate a few...
2
1138
by: Aad Terlouw | last post by:
Hi, In a particular macro I create various files.In a later stage of that macro I wish to merge these earlier created files into one large file.Is that possible with VB ? A.Terlouw
2
494
by: Rebecca | last post by:
could someone tell me the correct syntax for using vlookup in visual basic
0
2011
by: Speilman_54 | last post by:
Hi, I'm converting an excel Macro into visual basic 2005 express, as I don't have a copy of VB 6 and trying to make and executable from it, I know this version doesn't have the save file as .exe, but I have a 3rd party software that will convert vb projects into .exe files. My issue is in the the saving of the excel file. The macro...
1
2266
by: arun0580 | last post by:
I am running a VBA macro application in Microsoft Excel 97 under Windows XP -Service Pack 1 to, 1.Open an Excel work book . 2.Update a value in a cell 3.Save and close the file. I need to repeat the steps 1,2,3 for 1,00,000 times. But after executing the process around 32,000 times the Excel application crashes.The whole OS hangs. And a...
1
1331
by: wassimdaccache | last post by:
I'm trying to write this code in tools-macro-visual basic editor.. Private Sub Form_Open(Cancel As Integer) msgbox"teste this email " end sub it is not working ... in reality my question is HOW MAY I SEND WITH MY EMAIL USING MICROSOFT OUTLOOK EXPRESS a message box asking the person to confirm that he received my email ????
0
1188
by: gwmarin | last post by:
Hello, i am a complete beginner with visual basic so lets see if i can explain my problem. I've got microsoft excel 2003 which has got Visual Basic 6.5 and i need to create a macro which will click on the hyperlink in a particulur cell, problem is, i only want to click on the cells that are highlighted. So question is, whats the code to make...
0
1520
by: venson | last post by:
Hello everyone, I am working on a project right now and I needed excel solver to maximize the problem The project is about a decision support system, I am trying to do it on Visual Basic 2008. I am wondering is it possible to click on my VB and the input will goes to excel and run solver? Because solver contains some macro code, so I don't...
0
7580
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5481
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3634
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.