Two VB Codes for changing conditions
I have two VB Codes that work fine seperated, but don't work combined. How
do I combine them?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.Section(0).BackColor = vbWhite Then
Me.Section(0).BackColor = 13434828
Me.Section(0).BackColor = vbWhite
If InStr([Inner Hydro Operational Flights per Minute], "Unassigned") = 1 Then
[Inner Hydro Operational Flights per Minute].ForeColor = 16777215 'white
[Inner Hydro Operational Flights per Minute].ForeColor = 0
"Macro Hunter" <Macro...Help with code
I have a piece of code that extracts data from my database, but wish to
modify it so that will use a connection string and sql query which I will
place in a named range. Can anyone help?
Here is my code.....
With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;driver=SYBASE ASE ODBC
Driver;NA=22.214.171.124,5000;DB=master;UID=sa;PWD=", Destination:= _
.CommandText = Array( _
"SELECT sysdatabases.name, sysdatabases.dbid, sysdatabases.suid,
sysdatabases.status, sysdatabases.version, sysdatabases.logptr,
I'm wanting to insert data, in this case and employee's name from query1,
into the text of an email. Can anyone tell me how this is done. I've
provide some sample code below. Many thanks!
DoCmd.SendObject acSendQuery, "Query1", "HTML", "John Doe", , , "Adherence", _
"The following agent (Query1.[Employee Name]) is out of adherence"
you can use DLookup() but there may be a better way depending on how you are
running this code. For example, how are you deriving the "John Doe" nam...I broke the code and got 50,000 bucks
!!!!$$$$$$ EASY MONEY, AND IT REALLY WORKS!!!!!!, TRY IT AND YOU’LL BE
$$$Take five minutes to read this and it WILL change your life.$$$
I finally decided to read one of these articles in an internet newsgroup
describing how to make $50,000.00 in only one month from a $5.00 investment.
Of course I thought this was ridiculous ,or some type of pyramid. I talked
it over with my family, an attorney, and my friends, and they all agreed it
was some sort of scam. I hate scams because usually someone gets burned, and
I didn't want it to be me! I blew it off for a few wee...Compile error in hidden module: AutoExecNew
I get this error when i first launch Excel 97 on a NT4.0 PC
Take a look here:
OFF: "Compile Error in Hidden Module" Error Message When You Start
Word or Excel
It points at PDFMaker.xla as being the culprit.
> I get this error when i first launch Excel 97 on a NT4.0 PC
...Exception handling in unManaged code when being called from managed code
Here is some text from Microsoft press(exam 70-536).
"Exceptions in unmanaged code are markedly different from those thrown in
managed code. In earlier COM days, you could use the GetLastError function
to get the last error that was raised. This approach won't work in a managed
application because the return value of GetLastError might not be the
correct one. Why ? because the GetLastError method can be set by either a
..NET framework object or the common language runtime(CLR) "
What does this last sentence actually mean here. It says "because the
Ge...strip minus signs from right to left
When I import to excel from our accounting system, negative numbers show the
minus sign at the right e.g. 100- instead of -100 or (100) Excel reads this
as text and I have to go through the list manually inserting a minus sign at
the left and deleting the minus sign from the right.
Is there any easier way to do this? The numbers are not a fixed length, so
the - could be the third or the thirteenth character in the cell.
Found it! Thanks PJB
> When I import to excel from our accou...Working with Filters in code
I have a form that I use to input my data. I just added a cmbBox to the form
and I want to you it to filter the database. So that when I select a value in
the cmbBox I want the Record at the bottom of the form to show the number of
data that as being filtered so that I can then go through them and make my
How do I do this?
Me.Form.Filter = "[MY_FIELD] = '" & Me.cmbBox.Value & "'"
Me.Form.FilterOn = True
> I have a form that I use to input my data. I just added a cmbBox to the form
> and I want to ...wpf user control
using VS 2008 sp1 and c#, I have a user user control (uc1) which uses
another user control (uc2) in its xaml. When I compile the application and
then view uc1 in the designer, I get the error screen "Problem Loading" and
a blue squiggly under the reference to uc2 in the xaml and the tooltip for
the blue squiggly says "The type 'uc2' was not found...".
In the constructor of uc2 I have replaced the old exception handling with
some new exception handling and this problem began when I started using the
new exception handling. evidently id doesn't li...need a VB code
hi, i have the code below which takes the value in cell U17 everytime it
changes, and places it in column A on a sheet called graphs thereby forming a
list down the sheet of all the values that appear in cell U17, for charting
What i would like to do is to be able to duplicate this for different cells.
i would like to have the cell values of W25 appear in a list in column K on
the 'graphs' sheet. Could you please give me some code that will enable me to
capture the values for these two cells in sheet1 into the sheet called graphs?
any help would be greatly a...code 646
I received updates on my computer. I tried to install update and code 646
came up, what do I do to override the code/ I have tried to install updates
again and again and still get code 646...
...error code 646
it seems there are alot of people getting error code 646 on windows update,
and I have not seen a reply to fixing the 646... WHAT IS THE ANSWER TO THE
> it seems there are alot of people getting error code 646 on windows update,
> and I have not seen a reply to fixing the 646... WHAT IS THE ANSWER TO THE
Surely you jest. I find 26 other threads with " error code 646 " besides
yours in this new group. Did you bother searching for it ?
Here's 3 resolutions for Vista/Windows 7:
1) Temporarily disable User Account Control....Sales Stage Code
In the SalesStageCode field there is the "OnChange" event which we understand
provides the ability to add java script changing the probability field to a
numeric value dependant upon the stage that has been selected.
I am looking for code that will look at the SalesStageCode (eg, qualify,
negotioate etc etc) and depending on the stage input a percentage number into
the probability field.
An example of this could be somthing like:
If SalesStageCode = Qualify
then Prospect = 10%
I am not sure of the exact code. Does anyone know of this?
here is an example
==...Using Code/Display tables in Excel
I need to display a value to the users and when the users selects a
display value, I need to save a different code value to the file. In a
spreadsheet, the user will select frequency. I want to display text
for the code value.
For example, using the following table:
I want to display annual, weekly, etc to the user. When the user
selects one of these values, I want to save the corresponding code
value to the file.
How can I do this?
Here is a starting point:
1) From the control toolbox, select...including Managed code ( /CLR ) in MFC app
Since I added the managed code ( /CLR ) in my MFC app, in order to use
System namespace , every thing is really really slow. Just launching
the app takes more than 10 seconds, and opening a "file load/save
dialog box" around 5 seconds.
Is this "normal", or did I do something wrong?
Using VS2003? Even without using managed code, I find the launching to take far too long,
and a file load/safe to take far too long, because it wastes massive amounts of time
loading symbols it will never use, for purposes that make no sense whatsoever.
On Fri, 20 ...Security Flaw with Digital Signatures in Outlook
This report is also available graphically at
On 10/21/2004 the following vulnerability was reported to Microsoft:
Security Flaw with Digital signatures in Microsoft Outlook -
Emails in Microsoft Outlook digitally signed with S/MIME using either a
commercial personal certificate like Verisign or using a certificate issued
by MS Certificate Server can be altered. Outlook will not show any warnings
about the email being changed, the digital signature will still be
reported valid even though the message content has been modified and
parties involved in the sig...Microsoft Update Error Code 57
I have been attempting to have the Microsoft .NET Framework 3.5 Service Pack
1 through the Windows Update. Each time it is attempted it fails with a Error
> I have been attempting to have the Microsoft .NET Framework 3.5
> Service Pack 1 through the Windows Update. Each time it is
> attempted it fails with a Error Code 57.
Operating System in question (edition and version)?
Service Pack level of said Operating System?
Start button --> RUN
(no "RUN"? Press the "Windows Key" + R on your keyboard)
--> type in:
win...Remove Percentage Sign
Is there anyone who would like to tell me how I can remove
percentage sign? Such as:
69.6% to 69.6
I successfully removed percentage signs before but I
forgot what I did.
Any help will will be very appreciated.
Just reformat the number as General. But 69.6% formatted as general is .696,
not 69.6, so you'd have to multiply by 100.
"Charles Deng" <email@example.com> wrote in message
> Hi All:
> Is there anyone who would like to tell me how I can remo...How to automatically trigger the vba coding by opening worksheet?
The following code is stored under specific worksheet, whenever the worksheet
is opened, it required to update all links and do all the calculation for
each cells. For the given code, it requires to manually press F2 and enter
to update and trigger the rest of coding. However, the value within cell A1
is calculated by formula, without manually pressing, the rest
of coding will not be performed without triggering cell A1, so does anyone
have any suggestions on how to trigger the rest of coding without manually
update the A1 cell's value?
Thank everyone very much for any sugg...VB code "bolSingle" error
I am using D. Kallal worde merge code and am getting the following error for
when pointing to the following line
Call RidesMergeWord(strDirPath & Me.lstFiles & ".doc", bolSingle)
the error highlights "bolSingle"
ByRef argument type mismatch
The folowing references are checked
Visual Basic for applications
Microsoft Access 9.0 library
Microsoft DAO 3.6 Object library
Microsoft data access components installed version
Microsoft Visual basic for applications Extensibility 5.3
Dim bolSingle As Boolean
'...dollar sign #2
What does the dollar sign mean in a formula, for example what does $B$3
this means absolute cell addres. if you use this in any formula etc it will
always be B3 only.
Jules <firstname.lastname@example.orgXXX.co.uk> wrote in message
> What does the dollar sign mean in a formula, for example what does $B$3
It differentiates between absolute and relative referencing, and becomes
important when using a formula over many cells.
As an example, enter =$B$3 in A1, and enter =$B3 in B1. Then select A1...Passing command line arguements -Whats wrong with this code and can anyone help me out
Whats wrong with this code and can anyone help me out
Created a win32 console application and passed a command line
Now my program should print ---one
So in the program this is the code I wrote but IT FAILED.The screen
disappears in a flash.Pls help .Thanks in advance
int _tmain(int argc, TCHAR* argv, TCHAR* envp)
int nRetCode = 0;
cout <<" in main ";
// initialize MFC and print and error on failure
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetComm...How do I show a multiplication sign in front of a number
In an accounting spread sheet I need to set up three cells to show a
calculation in a specific way. The first cell is the first number to be
multiplied. The second cell is supposed to have the multiplication symbol
and the number to multply by. The third cell is to be a formula cell in
which the multiplication takes place and the results are shown. I don't
understand how my accounting teacher expects me to make the second cell. If
I show the multiplication number then the formula cell is messed up. Does
anyone have a suggestion. I thought about putting the multiplication sign ...Code to read a cell from every workbook in a folder
Any Ideas about what code would read the formula in cell c3 of ever
workbook in a folder and give an array of the workbook names and th
Message posted from http://www.ExcelForum.com
Something like this?
Dim myFiles() As String
Dim fCtr As Long
Dim myFile As String
Dim myPath As String
Dim tempWkbk As Workbook
Dim wks As Worksheet
Dim oRow As Long
Dim logWks As Worksheet
Dim myAddr As String
myAddr = "C3"
'change to point at the folder to check
myPath = "...Adding Plus/Minus Sign to Calculated Control in Report
I am trying to add a '+' and '-' to a calculated control.
=IIf([txtq1pre]-[txtq1post]>=0,"+", "-") returns the appropriate sign.
However, when I try to add something after the sign, the control return a
For example, =IIf([txtq1pre]-[txtq1post]>=0,"+" &
([txtq1pre]-[txtq1post]),"-"&([txtq1pre]-[txtq1post])) yields a large
number, when the underlying two numbers [txtq1pre] and [txtq1post] are both
less than 5.
Any help on my syntax?
>I am trying to add a '+' an...