Flashing Cell & Picture Load Additional Code
Jul 27, 2005
At the moment I have two macros. One loads up a background picture into my work sheet
when I start it up, the other two are called ‘StartBlinking’ and
‘StopBlinking’.
This is the macro code I have to load up the picture:
Sheets("CASHFLOW + FUNDSFLOW").SetBackgroundPicture Filename:= _
"G:EH_Background.JPG"
What I hope to achieve is:
1. Get the picture to ONLY load up if it actually exists on the G:
drive, otherwise do nothing.
2. If value 1 to 13 is input in Cell C3, run the macro
StopBlinking.
3. If Cell C3 is left blank again, run the macro StartBlinking.
View 5 Replies
ADVERTISEMENT
Feb 25, 2007
I have made the next code
Filename = Application.GetOpenFilename("JPG Files(*.jpg),*.jpg,GIF files(*.gif),*.gif")
If Filename = False Then
Response = MsgBox("Er was geen file gekozen!", vbOKOnly & vbCritical, "Er is iets fout gegaan")
Exit Sub
End If
Userform.Image1.Picture = LoadPicture(Filename)
Userform.Show
I can choose a picture and it will be vissible in the Userform.
The problem is it's not saved into the userform it self.
How can i make it so that when i choose a picture it's also the picture i see the next time i open the userform.
View 9 Replies
View Related
Dec 14, 2006
I have tried a couple things to get this image to show up on my userform and i keep erroring out.
Run-time Error '404' Object required
If i hover over the "userpic" in debug it has the correct referance, its just not doing anything.
Any help or suggestions would be great.
-LightData = Userform
-Pictures all held on sheet5 of wookbook
(I've search and looked at all the threads, which actually lead to what i have below)
Private Sub ComboBox1_Change()
Dim RowOffset As Integer
RowOffset = ComboBox1.ListIndex
userpic = ComboBox1.Text
LightDate.Image1.picture = Sheets("sheet5").Shapes(userpic)
TextBox1.Text = Sheet1. Range("c2").Offset(RowOffset, 35)
CheckBox1.Value = Sheet1.Range("c2").Offset(RowOffset, 37)
CheckBox2.Value = Sheet1.Range("c2").Offset(RowOffset, 38)
CheckBox3.Value = Sheet1.Range("c2").Offset(RowOffset, 39)
CheckBox4.Value = Sheet1.Range("c2").Offset(RowOffset, 40)
CheckBox5.Value = Sheet1.Range("c2").Offset(RowOffset, 41)
CheckBox6.Value = Sheet1.Range("c2").Offset(RowOffset, 42)
CheckBox7.Value = Sheet1.Range("c2").Offset(RowOffset, 43)
CheckBox8.Value = Sheet1.Range("c2").Offset(RowOffset, 44)
CheckBox9.Value = Sheet1.Range("c2").Offset(RowOffset, 45)
CheckBox10.Value = Sheet1.Range("c2").Offset(RowOffset, 46)
CheckBox11.Value = Sheet1.Range("c2").Offset(RowOffset, 47)
End Sub
View 6 Replies
View Related
Jul 27, 2012
I have a workbook with images and have created a userform using VBA in the same.
I wanted to load a picture in the userform from the images on sheet 3.
View 4 Replies
View Related
Aug 9, 2007
I have an image box on a userform in Excel VB. Is there ANY WAY to load an image into this image box from an object that I have loaded into an excel worksheet something like
If userform1.checkbox1=True Then
userform1.image.picture = loadpicture (Worksheets("Sheet1").shapes("Object 1"))
ElseIf userform1.checkbox2=True Then
userform1.image.picture = loadpicture (Worksheets("Sheet1").shapes("Object 2"))
Else
msgbox "No image"
Endif
View 2 Replies
View Related
Mar 3, 2013
I found this code on the web that I wanted to use to fit a picture into a cell. However, it sizes the picture proportionaly, and not to the cell size. How to get it to fit to the cell size.
(Also, how I can properly post code in a message. I read the user guide to the forum and it mentioned BB Tags, but I couldn't see what I need to do).
Public Sub FitPic()
On Error GoTo NOT_SHAPE
Dim PicWtoHRatio As Single
Dim CellWtoHRatio As Single
With Selection
PicWtoHRatio = .Width / .Height
[Code] ............
View 9 Replies
View Related
Jun 21, 2009
Im trying to loasd a pic of a userform using cell A1 as the referance for the file though i am going wrong somewhere.
View 13 Replies
View Related
Jan 29, 2014
I am using a spreadsheet as a score sheet for a competition. One of the columns is the student's GPA. After entering all the scores there are duplicate final scores. I need a way to have it look at the final score and then use the GPA so that it will not put a duplicate value in the final column.
al Column N is the Total Column, Column O has the Names that correspond to the Total Column. Currently I am taking this total and putting it into Column Q (High Scores) in high to low order. Column R should have the names that match the scores. But with duplicate scores, it is only putting the first name associated with the score. I would like to use the GPA as a final determining factor for the duplicate scores. The higher GPA would come before a lower GPA. I have tried to put an additional column to bring the GPA over to correspond with the High Scores Column, but could not get it to work.There are actually more names for the competition and the top 10 will be moved to a different sheet and further judged. I have attached a sample with the exact formulas that I am using.
View 1 Replies
View Related
Aug 14, 2014
Adding some additional code to prevent someone from saving the workbook under a different name. Currently if someone tried to enter data after the allotted time period, it would allow them to in any "unlocked" cells. When exiting or trying to save the file with this new data, they will get a message stating something to the effect that this is a read only file would you like to save as another name, which would allow the user to circumvent what I'm trying to accomplish. The end result would be they'd need a new spreadsheet.
[Code].....
View 2 Replies
View Related
Dec 16, 2002
I need to do a macro that will open a search window, the user would select a folder and it will search for a .csv file within it. Then after locating the file, it would automatically load it into a specific sheet in the workbook.
View 9 Replies
View Related
Oct 12, 2007
I originally posted this question with out the code I'm using. I am trying to make a specific cell flash to catch the attention of other dispatchers. The problem is when I we try to close the active page it will automatically open. The only way we can completely close the page is to close Excel completely. Doing this though also closes several other pages that we need to have remaining open.
Public NextFlash As Double
Public Const FR As String = "B3"
Sub StartFlashing()
If Range(FR).Interior.ColorIndex = 3 Then
Range(FR).Interior.ColorIndex = x1ColorIndexNone
Else
Range(FR).Interior.ColorIndex = 3
End If
NextFlash = Now + TimeSerial(0, 0, 1)
Application.OnTime NextFlash, "StartFlashing", , True......................
View 9 Replies
View Related
Feb 9, 2007
This might sound daft, but im just wondering if it is possible to Flash text 2 different colours in a cell. Cell A1 will say - - - Well done. and I want it to flash blue and red, but not use VBA to do it. Can it be done or am I wishful thinking? This would be on Office 97.
View 6 Replies
View Related
Mar 14, 2003
I mean to format a cell in a way that it will flash if certain conditions are met. For example : to make C14 to flash if B14>0. Different colour formatting is not enough to catch the "oldies" eyes!
View 4 Replies
View Related
Jan 11, 2012
I need to get a range of cells to flash when they get close to todays date, I have tried but can't do it, not very good at conditional format or vba, easy step by step if poss, i have sheet if required,
todays date = 11/01/12 (in cell O1 as autodate)
title in cell K7 is date on site
in Cell K8 = 13/01/12
in Cell K9 = 19/02/12 etc....
I would like this cells background to flash if its 2 days from the onsite date
View 7 Replies
View Related
Dec 30, 2012
I have % figures in the following cells, E20, G20, I20, K20, L20, F24, H24, J24, G28, I28, H32, F16, J16, G12, I12, H8.
These figures are the result of a formula of other cells, with constantly changing values, therefore the % figures are constantly changing as well.
What I would like to do is highlight the cell with highest % figure, ideally to 'flash', either cell colour or flashing text.
View 7 Replies
View Related
Jun 18, 2014
I have done the above where when I select a picture name from a drop down list it displays the relevant picture in another cell by using the IF function in the named formula
My question is why cant I use VLOOKUP instead of IF in the named formula. When I use it it comes with an error.
View 6 Replies
View Related
Oct 1, 2008
When I return to a sheet by clicking on the tab of the sheet, the sheet is not immediately visible. When the sheet does become visible a cell has a black flashing background. Sometimes, but not always, the flashing cell is the activecell. Through the activate event of the sheet I attempt to make $A$1 the active cell:
View 7 Replies
View Related
Mar 23, 2014
I want to paste/show a photo in a particular cell (D2) on a worksheet (called PP). I wish to delete any photo that may already be there in D2.
The picture's name (e.g. J-145.jpg) will be found in another sheet (called MP) in cell H1.
My pictures are stored in a folder (lets call it c:pictures) and the one I want has the same name (J-145.jpg).
I've tried many macros but none work.
View 14 Replies
View Related
Jan 22, 2009
i have saved some pictures in my excel sheet.
in the next sheet i want that when i write the picture name the picture will appear as vlookup helps in the getting text and nos. can i do this with pictures or i tried to get to much from excel.
View 10 Replies
View Related
Dec 3, 2008
I got this code from someone who is not currently available,
I modified it a little so that when I pick a picture it always lands on j96, but I need it to line up exactly on top of the picture underneath it
I have also attached a sample.
The pictures will always be exactly the same size
View 7 Replies
View Related
Feb 3, 2009
I have seen this on many spreadsheet but never figured out how to do this - click on a cell in a spreadsheet to open up a new spreadsheet?
View 4 Replies
View Related
Aug 18, 2009
I have used the following code behind a projects Command button for some time, and works well in Excel 2002/2003.
It's used to look for and insert a Picture file, located on the users PC, select cell C2, re-size it to fit inside a bordered cell area and then nudge it over, off the border line.
Sub Load_Image()
Dim oPict, PictObj
Dim sImgFileFormat As String
'Open file
GetPict:
oPict = Application.GetOpenFilename("All Pictures (*.tif; *.bmp; *.jpg; *.gif; *.jpeg; *.png; *.cpt; *.tiff),*.tif; *.bmp; *.jpg; *.gif; *.jpeg; *.png; *.cpt; *.tiff")
If oPict = False Then End
Range("C2").Select
Set PictObj = ActiveSheet.Pictures.Insert(oPict)
With PictObj
.ShapeRange.LockAspectRatio = msoFalse
.ShapeRange.Width = 712#
.ShapeRange.Height = 510#
End With
PictObj.Select
With PictObj
Selection.ShapeRange.IncrementLeft 1#
Selection.ShapeRange.IncrementTop 1#
End With
Range("A1").Select
End Sub
Unfortunately, Excel 2007 doesn't seem to identify the Cell reference "C2".
It modifies the Picture size OK but does not position the picture in the correct position.
I've tried re-recording it but 2007 misses most of actions.???
Despite my efforts looking on other forums, I don't seem to find a code that works on both version of Excel.
View 9 Replies
View Related
Feb 14, 2012
So far my VBA will copy my range of cells in Excel and paste them into Powerpoint but I'm totally stuck as to how to resize the image from there. I've tried a bunch of different methods and I get some pretty crazy results but can't seem to punch through to a solution. What I'd like it to do, at the end of the VBA is:
Set the lock aspect ratio to false
Set the Height to 5.5"
Set the Width to 9.83"
Set the horizontal position to .08 from Top Left
Set the Vertical position to .58 from Top Left
I cannot seem to get my save as portion to work at all. I commented it out at the bottom. This is all in Excel and PPT 2007.
Here is what I have so far:
Sub Export_Excel_to_PowerPoint()
Dim ppApp As PowerPoint.Application
Dim ppSlide As PowerPoint.Slide
On Error Resume Next
Set ppApp = GetObject(, "PowerPoint.Application")
On Error GoTo 0
[Code]...
Ultimately the behavior I'm looking for with this macro is to copy a filtered range of cells from Excel and paste it as a picture into Powerpoint (up til this point I'm golden) then resize the image on the slide, save the presentation, then exit PPT.
View 1 Replies
View Related
Apr 6, 2014
I have some files similar to:
A103.jpg
GU23.jpg
CU27.jpg
I want in Cell A1 type by sample: GU23 and then presenter or press a button, and in cell E1 display the jpg image with a specific Size, mmm 40x40 is possible?
View 9 Replies
View Related
Mar 14, 2013
how to write vba code using vlookup formula insert pic from picture folder
View 5 Replies
View Related
Jun 23, 2014
Rather than manually typing the time in 5 min increments across a range of cells, i want to have a start time, then the next cell add 5 mins. EG: 09:00 next cell 09:05 and so on.
View 7 Replies
View Related
Feb 3, 2014
Running a macro that would insert product images in to a sheet based on a SKU that is in a different column. My sheet has an image in Cell A3 based on the SKU code that is inputted in to D3. All of my images are stored in F:Images I will have about 500 SKU's that all need images and will be named the same as the SKU I enter in to Column D.
Can this be done via a VBA script?
View 2 Replies
View Related
Oct 10, 2007
Step1: Type the picture name that is store somewhere in the computer (C:/MyDocument/Pics)
Step2: After typing the pic name into the cell, the pic that is the same name as the cell text will be display (Type "apple" and the other cell load out the apple pic that is stored)
View 9 Replies
View Related
Aug 21, 2006
How do I load an image based on the cellref value already in the sheet? I have pictures in a worksheet labelled picture 1,picture 2. If Cell A1 = 1 I want it have picture 1 loaded in that cell. if cell a2 = 2 load picture 2 in that cell. also if changes to =2 replace picture1 in a1 with picture2.
View 2 Replies
View Related
Apr 6, 2014
i have some files similar to:
A103.jpg
GU23.jpg
CU27.jpg
i want in Cell A1 type by sample: GU23 and then pressenter or press a button, and incell E1 display the jpg image with a specific Size, mmm 40x40
View 2 Replies
View Related