I am using Mid function in my program. During execution, i am getting the waring message of "Complier Error: Cann't find project or library".I am not able to find the what is the reason behind on it. If really the library file missing.
I am rotating an image on a userform by uploading different gif images to simulate the rotation. There is an annoying screen flicker around the image when changing images that I would like to get rid of if possible. how to get rid of the flicker or a different technique I could use to rotate an image? 1st attempt - uploading different pictures
For h = 1 To Sheets("Bar Contents"). Range("B" & ItemRow) Step 1 PictureLocation = ThisWorkbook.Path & "PicturesTransparent" & Sheets("Bar Contents").Range("C" & ItemRow) _ & " " & h & ".gif" GameUserForm.DrinkAnimation.Picture = LoadPicture(PictureLocation) Sleep 50 DoEvents Next h.........................
I want to insert image on my userform, but I have problems with It. Image is originally .png and has no background, which is what I need.
Excel doesn't allow me to use .png, so I had to convert It to .jpg, but then background is included. Even that would be o.k., If I could somehow change picture background to "&H8000000F&" system colour, but failed to do that also.
So I tried with converting file to .ico, and again Excel recognizes It as invalid picture.
I just want to insert image, and leave background same colour as Userform.
in a userform in Excel. As you might have guessed, I've created a macro that, depending on user inputs, can take a bit of time to run, and I want to display something to let the user know that Excel hasn't locked up. Ideally, this would be a sort of faux status bar like the one above that implies that there is work being done without necessarily actually indicating the amount of work completed (I figure that would be easier to code).
Do you have any recommendations about how to accomplish something like this? Ideally also I'd like to not have to download anything in order to make this work, as the spreadsheet is designed for others to use, so it would be inconvenient if they had to install an add-in or similar to get it to run.
I am looking to if there is anyway to move an image box using a mouse drag and drop action. I have put together a little example of what I am trying to work with and was wondering if anyone on here had any tricks to make this work.
I realise the drag and drop method only applies to the textbox and listbox but have seen some old code that can simulate the drag and drop by creating a border of some sort to illustrate where the image box is going to be placed and final just setting the properties of that image box to where the border is placed.
In the example type in a size in the width and height textboxs (I used 3000,3000) and then what I want to do from there is move the white box using the mouse within the blue box.
I currently have a VB macro written where under certain conditions user forms are shown for the user to select options, display messages, etc. When any of these forms are on the screen, and someone drags them, the menu image is 'dragged' across the screen. Is there a way from preventing this from happening?
I need to link an image to a cell value and display the selected image in a new sheet of the same excel. I am attaching samplefile for easy reference. The requirement is, from the workout sheet when I select from drop down list, then the corresponding cell value appears in Parameter sheet in C9 cell.
There are four images copied in Parameter excel. The given image has to be selected and linked to the C9 cell value. Based on the selection that particular image should be shown on Sample Picture sheet. Here based on the selection only the image should reflect here.
My workbook simply has multiple columns of data which will be summarized visually in a tag cloud (I have the tag cloud part taken care of already creating either a jpg or png, I simply have to change the extension within a batch file to change between picture formats)
I need to have the tag cloud image display and update depending on which column the user would like to summarize (for now I have simplified the issue by only having one of the data columns in my workbook, and will worry about the user selection of the data column to be summarized later).
My Main Question:
Focusing on the image display and updating now, whether it be an ActiveX Image Control or any other way. I've been playing around manually before I try and code it and I can not get either a jpg or png file to attach to the ActiveX control (both of which cause an Invalid Picture Message).
The file name can stay the same if need be and for now I think/assume that'd be easiest (I have my Tag cloud generator just replacing the previously existing image file of the same name).
Would ActiveX control be the way to go for this dynamically changing image?
I am looking for a way to take the picture name associated with an image ie: (picture 571) and place that picture name in the cell next to the image.
I can see the picture name - it registers in the top left box that usually indicates the cell the cursor is on... and I could manually type that name next to each image.
However my spreadsheet has several thousand rows- each with several columns of information and an image..
I am looking for a way "formula?" to automatically read the image in cell J4 and populate cell K4 with the image name... and so on.
The reason for my request... is I am importing products into a web based shopping cart... to do so I have to export the products to a csv and import that csv into the shopping cart. The process of exporting to a csv- strips away all the images and leaves just data.
I found that I can save the document as an html and that process creates a folder with all the images- saved as (picture 571.jpg) if the resulting csv had the image name... the shopping cart would then look for that image name in my image file and it would populate into the shopping cart appropriately.
This seemed on it's face like a really simple thing to do, I have plenty experience with excel & I thought I'd be able to make cell k4= j4 and tada it would glean the image name & I could simply copy that formula all the way down the sheet & it would be done... but I just cant find the magic button that freely gives up the image name...
I have a number of image controls on a user form, each being loaded with an image from file.
Image1 being loaded with a picture of a bus image2 being loaded with a picture of a school
And so on
Now what I am trying to do is when that image is clicked the name of that image is passed to a textbox
So the action would be
1 image of bus loaded into image control1 , the name of that image being bus.jpg 2 image is clicked 3 the name bus.jpg appears in a text box
Here is what I have so far
Private Sub Image1_Click() DataInput.TextBoxItem.Value = bus.jpg
DataInput.TextBoxItem.Value= Image1.Name - this does not work
Which works but as you can see this is static, as I have supplied the value , were as I would like the clicking action to pick up the name of the jpeg being displayed
So expanding upon this if say image1 is loaded with say a picture of a car instead of a bus
LValue4 = "E:Car.jpg"
Image1.Picture = LoadPicture(LValue4)
Now when it is clicked the name of the image being displayed in image control1 would be Car.jpg
And it is this value I wish to transfer to a text box for now will do more with it later
In addition to this I am not sure if the best idea is to have a number of image controls and load each with an individual picture or have one image control and swap the picture by clicking a command button
Is there a way to have image box display an image with a name matching data from a cell? example: if I type "hello" in cell a1, Image box will load image named "hello". And display new images by changing the name in cell a1. Note: the images will be located in a permanent folder.
I am trying to display an image ("image") on an image control ("Image1") placed in a worksheet ("Sheet1"). The problem is that I want this action to take place when I press a button in a user form. I am trying to use the following code, but it seems that VBA does not recognize the image control ("Image1") in the worksheet.
Private Sub cmdDisplayImage_Click() Dim image As Variant image = ThisWorkbook.Path & "sun.jpg" Sheets("Sheet1").Activate Image1.Picture = LoadPicture(image) End Sub
is if I F8 through the code it works fine. But when I run the code through the button on the spread sheet. It stops at the Format comand. And says "Can't Find Project or Library." Has anyone ran into this issue or know how to solve it.....
I have been writing VB code for a mathematical model for a client and recently made some small modifications to a workbook and ran the code quite ok on my Windows XP computer (Excel2003).
When I sent it to my client who also uses Excel 2003 and has been running many similar pages of code, my client gets "Can't find project or library", with the highlight showing in the VB code at ..... "& Chr$(10)" and then again at "& Str(x)", - but no really rational reason why it should stop there.
I need to add a Reference to the "The Microsoft Visual Basic Extensibility Library 5.3" using VBA code in an Excel spreadsheet. I know how to do it going to Tools...References select the library etc, but I'd rather do it using VBA code so I don't have to do this extra step.