VBA code to insert pictures in a column of cells
I have a folder of 99 pictures with filenames: image01.jpg, image02.jpg up
to image99.jpg. All of these images are small, and the same size.
I want to insert them (in order) in a column of cells (A1, A2, to A99) using
VBA. The images should be embedded, not linked. Resizing cells to the right
size would be a nice extra, but not necessary - it's easy in this case to
resize manually. Thanks for looking at my question - and I hope to hear some
...array in VBA
A few days ago I saw an answer to a post that showed the VBA equivalent of
using an array worksheet formula with ctrl+shift+enter. I forgot to copy
that answer for later use, now I can't find it anymore. Anybody who knows
what I mean? If so, please tell me where to find the post.
"Jack Sons" <email@example.com> wrote in message
> Hi all,
> A few days ago I saw an answer to a post that showed the VBA equiva...VBA Passwords
I passwod protected by VBA modules so that no one could see them. But
have just come back from holidays forgetten my passwords and now
can't see them!
Any ideas how I can recover the
Message posted from http://www.ExcelForum.com
If you are using a newer version of excel that excel 97, then you will
either have to remember it or use a commercial password cracking program. If
you are using Excel 97 there is a free program called vbakey.exe that will
tell you your vba password.
Outgoing mail is certified Virus Free.
Checked ...excel vba
I have set up my sheet to protect using a password name login which the
runs the macros. It is set up so that the sheet's cells cannot b
edited, but the person can copy/paste the info onto another sheet.
This is a problem because there are hidden cells which contai
sensitive data. Any ideas
Message posted from http://www.ExcelForum.com
Hi, just a comment that i just found out, check out this
link that I was refered too. That password that you
setup doesn't do squat when you have access to this...
I was mad when I saw this, when mean...HELP WITH VBA
I am trying to finish writing some simple program.
My problem is that when I try and change the arguement from SELECTION
CHANGE to CHANGE, it doesn't work. Can someone help?
Private Sub Worksheet_Change(ByVal Target As Range)
If Worksheets("Sheet3").Range("B3").Value = 2 Then
My second problem is that I would like my data rather than appearing in
a cell, appear in a TEXT BOX. What do I do?
Copying your exact same post from 3 days ago word...VBA
Ok, all you expert Excel users may think this is dumb.....but what is VBA?
And what do you use it for? I looked around and can't figure a thing out.
Visual Basic for applications. Used to write macros/programs. As a
"Kim" <Kim@discussions.microsoft.com> schrieb im Newsbeitrag
> Ok, all you expert Excel users may think this is dumb.....but what is
> And what do you use it for? ...VBA function changing name
OK, here's a strange one - well strange to me anyway. I've declared a
function in a module using mixed case:
Function TMDE_Category (FormName As Form)
The function is called by the VBA code behind two different forms. I noticed
the other day that it appeared in the module as
Function tmde_category(FormName As Form)
Obviously, this isn't preventing the database application from running, but
I can't figure out why it changed. I changed it back to the mixed case
declaration, saved the module, exited the app, reopened it and looked. The
function had changed back t...Right-Aligned CMenu, Submenus
We have an image toolbar that runs down the right side of our
application that consists of CButton-derived buttons. One button, when
clicked on with the left mouse button or selected by the keyboard,
launches a cascading menu to the left, which in turn has its own
submenus that open further to the left.
The problem is that the left and right arrow keys are backwards from
what the user expects -- the right arrow key opens a submenu, the left
arrow key closes the submenu. (This is the normal behavior for a menu
that's left-aligned; the behavior seems to be unaffected aligning the
menus to ...Serious error during VBA event
We've added VBA code to several windows. Now, all of a sudden, we're getting
this error message, "A serious error occured during a VBA event", for
non-admin users. This is a Citrix environment and we do not get the error
when we log onto Citrix as an administrator.
We found knowledgebase article # 929612 which tells us to give full control
to four registry keys for all users. We tried this but we're still getting
...Find vba problem
I'm using the following to find text in cells:
Cells.Find(What:=Range("D3").Value, After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:= _
xlByRows, SearchDirection:=xlNext, MatchCase:= _
The formula works if it only text in the cell. What if the text is the
same only as a result of the formula in the cell, the above doesn'
I take it there is no match as above is looking at the formula in th
cell and not the text? Is there any way it can to changed to recognis
the text and not the formula
Message posted from http...VBA
ActiveCell.Formula = "=HighLevelSummary_%!$C$5"
When I run this code, I get Run Time Error - 1004
Application defined or object defined error.
I will appreciate assistance in identifying the problem
with the code.
- are the 2 sheets. In cells - J53-K53 I want to put the
link to cell from sheet HighLevelSummary cell C5.
try this. Modify to suit.
'Set frng = Range("h8:h" & Range("a65536").End(xlUp).Row)
set frng=range("j53:...Re: Excel VBA
i have a problem with Excel (maybe it's the easiest thing in the world
I don't know, I'm new to Excel):
Let's say I have following formula into cell A2: =SUM(A1:A1)
Now, a row is inserted at A1, so the formula is now into cell A3. Th
formula itself is now SUM(A2:A2), the reference has change
So far, so good.
But: I want the formula to add the values of ALL cells above, i.e. th
formula should be SUM(A1:A2) if I insert one row. If I insert anothe
row, the formula should be SUM(A1:A3) - NOT SUM(A3:A3). I think th
best way to solve this is VBA...
I ho...VBA equivalent for Excel "indirect()" function in UDF
I often pick random elements from a list (named range), whose name is typed
However, the attempt to make this a UDF function in VBA fails, since
"INDIRECT()" is not part of the "worksheetfunction"-collection in VBA.
Is there any equivalent that may do the trick ?
Thank you in advance.
I don't believe there is a direct equivalent in VBA for INDIRECT. However,
you can use Offset to refer other cells.
myValue = Range("B2...VBA
I have a column in my spreadsheet that contains the column header one or
more items underneath. Is there a generic method to select all the items
I have tried...
Set myRange = myWorksheet.Range("A2")
Set myRange = myWorksheet.Range(myRange , myRange.End(xlDown))
....but if the column only contains one item, the range is from that item to
the bottom of the spreadsheet.
Set myRange = .Range("A2:A" & _
.Range("A" & .Rows.Count).End(xlUp).Row)
In article <403a40b2...VBA Outlook 2003
I use vba to send outlook mails from excel 2003 :
Sub EnvoiMailM�thodeOLE(Adresse As String, Objet As String, Corps As String,
Optional Pi�ce As String, Optional Cc As String, Optional Bcc As String)
Dim MonAppliOutlook As New Outlook.Application
Dim MonMail As Outlook.MailItem
Dim MaPi�ce As Outlook.Attachments
Set MonMail = MonAppliOutlook.CreateItem(olMailItem)
.Display ' retirer
le commentaire si vous voulez que le fen�tre Outlook s'affiche
.To = Adresse
If Not IsNull(Cc) Then .Cc = Cc
If N...Arrow Keys backwards
I have one text column that when I am in a cell, my arrow keys and Home and
End keys work backwards. Left is Right .... ect. Also, when I tab out
of the cell, the last two characters are moved to the frount of the cell.
'Hello??' becomes '??Hello'.
Any ideas as to what happened ??
...How do I do this in VBA?
On button press, check a value from the table1 of current record, field 1 and
if it's nothing there do something(I have an UPDATE table statement), if it
is, leave it that way.
I tryed with Dlookup with Nz(Dlookup with if IsNull(Dlookup ... can't get it
You need a way to identify the current record - such as its Primary Key.
Private Sub cmdBtn_Click()
Dim varReturn As Variant
varReturn = DLookup("[Field1]", "Table1", "[PkField] = " & Me.PkField)
Note: in the above, varReturn may be Null if there is no...How to break some SQL into VBA
I am trying to figure out how to break some SQL into VBA. I feel like I’m
almost there, but I seem to be missing something. Below is my VBA:
strSQL = "SELECT SharePrices.StockSymbol, tblStocksGroup.Company,
tblStocksGroup.Group, tblStocksGroup.Class, qry0.DateTime AS [Date],
([30Days]-[ZeroDays])/[ZeroDays] AS [30Day%Return],
([90Days]-[ZeroDays])/[ZeroDays] AS [90Day%Return],
([180Days]-[ZeroDays])/[ZeroDays] AS [180Day%Return],
([365Days]-[ZeroDays])/[ZeroDays] AS [365Day%Return], AND " & _
"tblStocksGroup.HDVest50k, tblStocksGroup.HDVest100k, tblStocksGr...VBA to find difference in cell locations
Is it possible to find the difference between cell locations. Such as if I
am on cell E1 and pick another cell H1, I would like to know the difference
between the locations. In this case there are 2 cells between E1 and H1.
I am writting a code that needs to know the difference between the cell
location, I just don't know what the VBA looks like for something like this.
You don't need VBA for this.
You could use:
and if you wanted the row difference:
If you wanted to ignore the end points, you could just subtract 1...Vlookup in VBA
I have to do a vlookup with VBA in one worksheet in which the Table_Array
will go from column A11 to L11 down to a row, containing a specific text,
"Paid." is that possible
please stay in your existing thread
> I have to do a vlookup with VBA in one worksheet in which the
> Table_Array will go from column A11 to L11 down to a row, containing
> a specific text, "Paid." is that possible
Why not keep to the original thread and respond to Frank's suggestion?
"Jeff" <Jeff...XL97: Position text boxes (or data labels) w/out VBA
Greetings, all -
I have a set of 3 charts, each a box-and-whisker plot with 2 added
horizontal lines (actually "areas") which bisect the plot area into 3
sections. I would like to label the top section of each chart as "Good,"
the middle section as "Fair," and the bottom portion as "Poor." I'm
using text boxes instead of data labels since the bottom portion doesn't
really have a named data source, it's just the plot area. I'm finding
this difficult to explain...I'd like to position these text boxes so
that they are in the same...Setting Primary Key on a Linked SQL Table
I am linking to SQL tables. On one of them, the "Select Unique Record
Identifier" dialog box comes up, and I have to choose one or more fields for
my primary key. How can I program this in VBA so that this step is done
automatically? If it helps, this is the line of code I use to link the table:
DoCmd.TransferDatabase acLink, "ODBC", strCon, acTable, "AttendanceCode",
"dbo_AttendanceCode", , True
Hum, this should be done automatically, if I remember correctly. The first
thing to do would be to make sure that a primar...security to VBA
It's not a big deal. I'm just curious about something.
I know about the dots that appear on either side of the window's title when
you are either modifying the window or adding VBA code to it.
And, I know that if a window has been modified and had VBA code added to it,
you can take away security to both of these elements and in effect remove
both of these dots if you take away security to the modified window.
Just now, though, I added VBA code to GP on my local laptop. Then, so I
could disable security to the VBA code should I ever want to, I added the
window to M...Problem with changing a cell validation through VBA
I have a problem with a macro which I have recorded in Excel. The macro
comes with an error in running the recorded script. This error is:
Run-time error '1004': Application-defined of object-defined error.
This is the VBA-coding which has the problem:
Momentarily the cell has the same validation, only the Vlookup has to
match "YELLOW". This rule has been manually ...Can't use key and keyref with an attribute in a group
Why can't I create a key and keyref with an attribute declared in an
attribute group? Code below describes what I'm trying to accomplish.
<!-- An attribute group -->
<xs:attribute name="Name" type="xs:string" />
<xs:attribute name="Type" type="xs:string" />
<!-- CT using group above -->
<xs:element name="Control" type="ctControl" />