Elfa:
Enter this formula in column C:
=IF(ISERROR(VLOOKUP(B1,$A$1:$A$10,1,FALSE)),"No","Yes")
If this formula is in cell C1 then it will return 'Yes' if the value in cell B1 is anywhere in the list contained in column A. If you want to search all of column A and not just cells 1 through 10...
Vittles:
This code will pull data from an Excel file and populate a ComboBox in a Word doc.
First you'll need to copy this data to a test file: "C:\Data\States.xls"
State Value Year
ALABAMA 287.14 2006
ALASKA 281.95 2000
ARIZONA 301.76 2000
ARKANSAS 809.75 2006
CALIFORNIA 813.27 2004...
Gerry:
What do you get when you use the immediate window of the VBE to check these values:
ThisOutlookSession.Session.Type
ThisOutlookSession.Session.CurrentUser
Are you connecting to an exchange server? I'm using a POP3 connection to my ISP's server.
Ron
PH:
What version of Outlook are you using. I'm using Outlook 2000 and it doesn't support the 'SenderEmailAddress' property for the Outlook.MailItem message object. That would be too logical and much too easy for billy boy! And, yes I do run into the $%^&%^*#@ security warning for scripts within...
I've diverted a set of messages into a folder based on the subject line. Now I want to search a database using the senders email address but I can't get to the information I need using Outlook VBA. I'm using this code:
Dim ol As New Outlook.Application
Dim ns As Outlook.NameSpace...
Looks like the namespace isn't set right. I used:
Set ol = CreateObject("Outlook.Application")
Set ns = ol.GetNamespace("MAPI")
MsgBox ns.CurrentUser.Name
MsgBox ns.CurrentUser.Address
and it provided the info you wanted. Look up the 'Recipient' object to get the details.
Check this out at MSDN:
'Managing ntext, text, and image Data'
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_qd_13_8orl.asp
Especially, the GetChunk function under the link to 'Managing Long Data Types' within the ADO section...
EddyH:
I got so "entangled" with my own code I forgot about your second question. (By the way, you'll get better visibility if you post your questions on independent threads.)
Here's my code. PH was on the right track, the trick is to use the "FormulaR1C1" property or the...
EddyH:
I've always found Tony's tips to be on the mark and very helpful so I've nothing to be upset about over his star. But, "disentangle", now that hurts! :-<
To walk you through it:
If you make a call to GetFinalPageCounts (See updated code below),
first the function turns off...
Your on the right track. Just use the formula twice:
=IF(ISERROR(MATCH(5,A1:A20,0)),0,MATCH(5,A1:A20,0))
Once to check for the error and the second to insert the corect value incase there isn't any error. Just be sure to replace the error value with one that can't be a part of your solution...
After tweeking a recorded Macro this would be one method:
ActiveSheet.Range("A1:C20").Select
Charts.Add
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:C20"), PlotBy _
:=xlColumns
ActiveChart.ChartType = xlSurface...
The default location for your email database is:
C:\Documents and Settings\<Your User Name>\Local Settings\Application Data\Microsoft\Outlook
and the default name is "outlook.pst"
try searching your drive for any .PST files again. If you find any use the "File|Open PST...
EddyH:
Looping through all the rows could take quite a while. Try the following code instead:
Public Enum ViewPointAction
SaveViewpoint = 1
RestoreViewpoint = 2
End Enum
Sub SelectRealLastCell()
Dim lRealLastRow As Long
Dim lRealLastColumn As Long
Range("A1").Select...
sciclunam:
check out: http://www.microsoft.com/technet/treeview/default.asp?url=/technet/scriptcenter/scrguide/sas_wsh_aytf.asp
You'll need to check the TargetPath property for your old path value and change it to your new path.
ie:
from: TargetPath = "C:\MyData\Old\Path\MyFile.exe"...
EddyH:
Try this:
Sub Test1()
Dim X As HPageBreaks
Dim pb As HPageBreak
Set X = Worksheets(1).HPageBreaks
MsgBox "Page Break count: " & X.Count
'This is required to populate the HPageBreaks collection!?!?
ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Select
For Each pb In X...
Pluz:
I can't remember how to reference the VBA code but I have come across it somewhere. You can rename the VBE Project to something specific and find a reference to it in the browser.
Otherwise, you could add a switch to the auto_open routine. Place an exit_if at the begining of your...
bikerted:
Each user has a file in their profile directory named "Excel.xlb" that holds their personal toolbar customizations. Excel opens this file automatically so your users can't open a second one without getting the file already open error you described.
To distribute a custom...
GP:
The FileCopy method may not be able to use wildcard characters. Try using a specific file name. You may have to use "Dir" first and feed the results to this method. Or, you can use a command shell and perform a copy there using wildcard characters:
ID = Shell("CMD /C Xcopy...
spastica:
You can't quite do what you want. If you leave the cell value as a numeric then you can not change it's internal representation. I mean you can't change 500.00 to 000500.00. What you can do is change how the cell value is displayed. By changing the cell format you can get 500.00 to be...
woodrasj:
I don't know if this relates to your current situation but when I worked with a Novell server a missing file owner meant that a file was owned by a user whose account had been deleted or corrupted. I was told then that the only way to determine who owned a file like this would be to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.