Excel 2003 - VBA
A quick question on the "Workbook Open" event: When I load up Excel and open
the workbook, this event triggers. If I then close the workbook, without
closing Excel, then open the workbook, it does not occur. Close down the
worksheet and Excel, then open it, it triggers.
Is this normal operation?
Could it have to do with the possibility the I had set
Application.EnableEvents = False, before exiting the workbook.
Also put in
Microsoft MVP Excel
"Craig Brandt" <brandtcraig...Merge records function
Is it possible to reuse the record merge function in CRM. Fx to call the
function with a valid Account GUID with a URL-call to mergerecords ?
I want this to open the merge windows with the GUID as the master record.
...Lock and Unlock cells using VBA
Anyone know how to lock cells using VBA, also unlock others currently locked.
Page protection will be in use at the time this needs to be done.
Also, is there anywhere on the net with a complete list of VBA functions,
including a short statement of what each one does, with or without examples.
If not, any good books that cover the above area. I'm really (strange as it
might seem), enjoying playing with VBA and seeing exactly what it can do.
The easy questions...
Excel's Help is a very good source.
take a look at Peter Nonely's workbook that describes...Excel functions
Hope somebody could help me with these problems.
row 1 =DSUM(database,field,'$A4:$A5)
where A4 = "destin"; A5 = "Consolidator 1"
row 2 =DSUM(database,field,'$A6:$A7)
where A6 = "destin"; A7 = "Consolidator 2"
row n =DSUM(database,field,'$An:$Am)
where An = "destin"; Am = "Consolidator n"
I waste a lot of rows for this criteria only because I do not know ho
to create it another way, I mean (A4, A6 and so on)
I have named several range of cells in workbook. I want to change...Writting Function using VBA
I am trying to write a function to return an address but
instead I get #VALUE!.
Public Function fnd(a, b)
fnd = Range(a).Find(b).Address
..Find won't work in UDF's called from the worksheet until xl2002.
Depending on the range (a), you could use application.match() through each
If the range is small, you could just loop through the values in that range,
> I am trying to write a function to return an address but
> instead I get #VALUE!.
> Public Function fnd(a, b)
>...Populate List Box
Need some ideas.
I have a list box from which our clients will be able to select which form
they want to preview or print. However, each client should only have
selections available that apply specifically to their company. For example:
Company A will require forms 1, 2, 3, 6 and 7
Company B will require forms 1, 6 and 7
Company C will require forms 4, 5 and 6
I have some code right now to handle a simple two form variation:
If Forms("Main").Controls("Form1Req") = "Yes" and Forms("Main").Controls
("Form2Req") = "No" Then
Me.L...converting hand drawn sketches into Visio Cross Functional Horizon
I am new to Visio 2003 . Can anybody tell me how can one convert hand drawn
sketches into Visio Cross Functional Horizontal diagrams?
Are you asking about a way to scan images into Visio and transform them into
drawings? Or are you asking how to assemble a Cross Functional diagram?
To make a Cross Functional diagram, you first choose how many bands to
create. Then you click on the headings for the bands to change the text to
the names you want. Switch to the Basic Flowchart shapes in the Shapes
Window and drag out the Process shapes to create the steps in you...MFC String-table in C# ?
maybe a bit OT for this newsgroup, but I know that people here use C#, too.
So, does anyone know how the MFC string-table technique map to C#/WinForm?
I initially thought about using an integer->string map in C#, but is there
some built-in mechanism to manage that?
"Giovanni Dicanio" <giovanniDOTdicanio@REMOVEMEgmail.com> ha scritto nel
> So, does anyone know how the MFC string-table technique map to C#/WinForm?
....after some web search, it seems that C# has a ResourceManager class ...XML deserialization from string
I have an XSD and created a VB.NET class file from it. When I have an
XML file (conforming to the schema), it is straight forward to
deserialize using the class file.
I am looking for ways to deserialize when I have the XML as a string
and not in a file. Writing the string to a file and deserializing from
the file might have an adverse effect on the performance.
Anyone know of a good method to do this?
Any help will be appreciated.
Use a StringReader to read the file and wrap that in an XmlTextReader.
This posting is provided "AS IS" with no warranties,...Excel super slow on paste function in 2007
When you copy and paste one cell to another I get the circular waiting bar
and after 4-5 seconds it pastes. If I'm doing a bunch of cells, it still
takes 4-5 seconds per cell and the cells will appear right to left, 1 every
4-5 seconds until it's complete.
If I hit ESC, everything copies and pastes right away.
This started happening when we converted a 2003 file to 2007. It affects
everyone so it's not my PC, it's the document. There are no active add-ons
but I recently downloaded an add-in that I got from this discussion board to
find hidden links (it's d...VBA to default printer in Crystal Report
is it possible to set default the printer for crystal report to be the same
as the printer setup in GP (Files>Print Setup)?
eg: is GP is using Printer1, then when calling a crystal report using VBA,
the printer will be set to Printer1. If GP is using Printer2, then crystal
report will be defaulted to Printer2.
thks in advance.
Unfortunately that isn't going to work for a couple reason:
1. The biggest reason is there isn't any way to determine what the printer
is in Dynamics. Not even with Dexterity. It just wasn't something that was
exposed. So I can't think of ...Automatic Functions in Excel
I am developing a Time Sheet in Excel for Staff to record times worked
on it. I am using the 1904 date system as occasionally a negative
total will be displayed.
I would like it if someone was on annual leave they would be able to
record this by typing in "Annual Leave" or "A/L" or something similar
then the total for that day to display as 7:00 (this is in hours). At
present the "total" column runs a calculation of the time finished
minus the time started.
Is this possible?
StartTime in column A, end ti...is there a baby-sitting function in Exchange
One user is not very diligent on reading and responding to emails. He is on
the road quite a bit and when he gets back he will not remember that one
important email that we needed to respond to.
Is there a way that I can have other users have his mailbox open as well, so
that they can monitor it and make sure things get replied to?
There appears to be such functionality in OL2003, but it just doesn't open
Plus his password changes every 30 days, as per the administrator settings,
how do we deal with that?
Thanks in advance, Robert
Assign Full Mailbox ...Conditional Formatting in VBA in 2007
I have a series of non-contiguous rows that I want to apply
conditional formatting to. Right now, my code snip looks like this:
With Range(sBegRange, sEndRange)
.FormatConditions.Add Type:=xlExpression, _
Formula1:="=" & sCFCell & ">40"
.FormatConditions(i).Font.Color = 3
.FormatConditions(i).StopIfTrue = False
Where sCFCell is a string value for the cell I want evaluated for the
formula, and i is an integer that increments for each time I create a
new rule (which I'm doing for each row I format).
It...wchar_t as a string parameter
I believe I am going crazy. I just compiled the 'release' version of my
program and am having issues with the passing of a wchar_t string to a
Both Debug and Release:
- stdcall calling convention
- treat wchar_t as built-in type = NO
- unicode char set
bool MyFunction( LPTSTR szString );
When I declare the szMyString variable, it has a starting memory address 4
bytes BEFORE the address that it has when it is passed inside the function.
This only happens on the Release version of the program. Am using VS2005.
Je...How to Declare Pointer to Member Function?
I have a thread that needs to make data visible to a function inside a
In the past, I was using PostMessage to get my information to the class
function, but occasionally a message gets lost this way.
I could declare the class function as static, but then the function would
not be able to interact with other parts of the class.
The data is thread safe.
typedef void (*PtrToLpMsg)(LPTSTR lpMsg);
g_AddStatusMsgFn = AddStatusMsgA;
void CMain::AddStatusMsgA(LPTSTR lpMsg)
// other code
On Mon, 16 ...non vba way to print non continuous ranges #2
Thanks Myrna, I didn't know about the hide columns facility.
It makes what I want to do a lot easier
DavidObeid's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=223
View this thread: http://www.excelforum.com/showthread.php?threadid=27196
...Function to control how data displayed
I have 2 columns that I exported from Access to Excel. In Access th
columns were Yes or No. In excel they display as True or False. I wan
them to show as Yes or No what is the function to make this happen?
LOgle5318's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2659
View this thread: http://www.excelforum.com/showthread.php?threadid=39860
Assuming your True and False are in columns A & B then
In C1 put
and...Error message when retriving a string from my xml file in C#.net a
I created the following code in my C# program but it's giving me error
message at run time of :
XML.XPATH.XPATHEXCEPTION : Namespace Manager or XSLTContext needed. This
query has a prefix, variable or user defined function.
Can someone see what I'm doing wrong? Thanks, Alpha
private XPathDocument unityMessages = new XPathDocument("UnityMessages.xml");
unityMsgNavigator = unityMessages.CreateNavigator();
string query = @"/trans-unit[@id=""m1""]/target[@xml:lang=""fr""]";
XPathExpression queryM1 = unityMsgNavigator.Co...XL2003: INDIRECT() function changes calling cell
It appears that the INDIRECT() function changes the calling cell.
Let me try to explain:
I have a dynamic named range "NR6.PerMonth":
- When "=NR6.PerMonth" is in cell C27 on the "Summary" sheet, it will
refer to/return cell C982 on the "6" sheet.
- When "=NR6.PerMonth" is in cell D27, it will refer to/return cell
D982....and so on and so forth, going across.
BUT!!! (A26 on the "Summary" sheet is a formula that returns the number
6...A982 on the "6" sheet is a label):
- When '=I...in vba what command is used to determine if a particular cell on a particular sheet changed? some kind of event? how to get the old and new value of the cell?
in vba what command is used to determine if a particular cell on a
particular sheet changed? some kind of event? how to get the old and new
value of the cell?
excel does not keep track of the old value, nor can you get
if from the event code.
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
"Daniel" <email@example.com> wrote i...Average Function #2
I am using Excel 2003. I understand there is probably a very sophisticated
way to get what I want but I need to learn the simple way first. I have a
data sheet named "MICU". I inserted another sheet in the workbook called
"Stats". I want to break down the data by month on my new Stats sheet. The
MICU sheet has many columns of info. The 2 I think I need to use is a
column for start date "ThpyStDtTm" (Date and Time field 3/14/09 18:41) and
a column called "VentLOSDays" (Number format with 2 decimal places).
Column A Column...How to call a function from another workbook
how can i call a function or procedure that contained in another workbook ?
When you want to use an UDF or procedure in several workbooks, then save it
into a module of Personal Macro Workbook (Personal.xls, it's created
automatically, when you select Personal Macro Workbook as destination to
save a newly-created macro, and later is loaded automatically whenever you
(When sending e-mail, use address arvil<At>tarkon.ee)
"Joe" <Joe@discussions.microsoft.com> wrote in message
news:AF3EABAE-6751-4917-88F1-1A5...Function Call Problem
Could anyone help me with this Dialog App (first visual app). I am
writing a test program for using Tab Controls. However, I have found that I
am not sure how to call a class member function from the main dialog class
to another dialog class.
The program compiles normally. But the function call is causing an
"Assertion Failed" error message whenever the button is clicked. It is used
to print a number in a dialog of a tab control, and it also prints the same
number in the main dialog. Both of these numbers are printed in Static Text
This is the code from the main Dial...count function in pivot table
How to count the number of types under certain group in a pivot table:
Such as one sku occurs twice under one customer, I only need 1 in pivot
table, instead of count the numbers of occurrences: 2
A pivot table won't calculate a unique count. You could add a column to
the list, then add that field to the pivot table.
There's an example here:
> How to count the number of types under certain group in a pivot table:
> Such as one sku occurs twice under one customer, I only need 1 in pivot
> table, inst...