Randomly selected numbers
How can I randomly select six different numbers at any one time i.e lottery
numbers. I have tried using the formula
=INT(RAND()*49)+1, which works OK but I get repeated numbers, can anyone
Here is what I use for the California lottery to
pick 5 non duplicate numbers from 47 possible...
Dim i As Long
Dim j As Long
Dim ArrTwo(1 To 47) As Long
Dim ArrOne(1 To 5, 1 To 1) As Long
Do While j < 6
Randomize (Right(Timer, 2) * j)
'Int((upperbound - lowerbound + 1) * Rnd + lower...Swap selected cell values
I am looking for a simple macro to swap the contents of two selected
cells. The cells might not be next to each other.
I know what I want it to do, but I don't know vba well enough.
If anyone has a moment to help, here is what I want to do.
Select cell1, could be A1
Control-Click additional selection of cell2, could be C1
Hot-Key Macro to:
Assign cell1 value to variable1
Assign cell2 value to variable2
Assign variable1 value to cell2
Assign variable2 value to cell1
Note: the specific cells being selected will not always be the same.
So after the macro is run the values that started ...Report on select general ledger accounts, that are not sequential.
There are many time when we need to review specific general ledger accounts.
These accounts are not necessarily in sequential order, therefore we have to
print much more than is needed or may separate reports.
It would be helpful if a detail/summary trial balance report could be
generated, using some type selection criteria other than account
number,segment or date.
Example: We have multiple general ledgers that relate to mortgages. These
accounts can be income, expense, assets, etc. They cover a large range of
general ledger numbers. I'd like to pull all accounts related to mort...emails with Track in CRM selected go to Junk folders or stopped by
When I select Track in CRM while sending e-mails, it adds text like
CRM:0000100004 in the subject. As a results some of the e-mails sent to
customers were not received by them. Later on we founf out that they went to
the Junk folder in one case. In another case, the corporate e-mail server
blocked the message.
Is there any way to hide the "CRM:..." from subject but still keep the
I recently changed the prefix from CRM to "PAS" - our company name. If thats
the reason for e-mails are going to junk mail, I will know it soon. Is there
any other r...Select Multiple columns in combo box
I have a form which has the following fields on it called “currencyMonth”
“invAmt” and “curr” which holds values: GBP, or EUR, etc.
I also have a combo box which is a table of currencies and values listed as
currencyMonth, rate, abbr.
1/1/ 2007 $1.87 GBP
1/1/2007 $1.27 EUR
2/1/2007 $1.90 GBP
2/1/2007 $1.50 EUR
The “abbr” of the table above has the same values as “curr” on the form.
The rate from the table of currencies is different for the currencyMonth.
I’m trying to get the form to function as follows:
afterUpdate of ‘invAmt, have the...New user with focused direction! Will Excel and VBA do it?
First, the background - I am certain a code geek designed Newsgroup format
and sign-up. Take a lesson from Yahoo. (This should seal my fate with the
group.) OK, Debra, I'm here and on my feet, so far. I built my first userform
with Debra's concise tutorial a couple weeks ago. Excel is intimidating; I
lose my information input. Enough background.
A form to enter data, specifically related to wood properties - it's a hobby.
Form settings which are saved between sessions. The settings process the
data based on how it is obtained, three methods with one being customar...Select Names Dialog box in OWA
Ok, so I know you can 'normally' just enter ' ', then find, then all names
appear from the 'GAL' using OWA and IE. But I just saw an OWA with an
alphabet listing along the top of the dialog box and the GAL being
automatically generated in the 'Select Names -- Web Page Dialog' box.
Where's that setting in Exchange 2003?
Windows 2k3, w/Exchange 2k3. Not running SSL, either instance.
Thanks in advance.
...How to limit CEdit character?
I want to know how to limit the number of character a CEdit can accept since
I look for the properties of text length but I could not found it? My
application should only allow 4 characters.
Thank you very much.
Use the CEdit's SetLimitText() member funtion to limit the maximum
entries to 4.
"Landon" <Landon@discussions.microsoft.com> wrote in message
>I want to know how to limit the number of character a CEdit can accept
> I look for the prope...Sorting in select query. manually
I have a select query and I would like to sort on the field month. but I
want to be able to specify the order myself (not descending nor ascending).
how can I do this?
You create a table with the data you which you would see in the Month field
and the sort order that you want. You then join these two tables in the query
and sort on it.
Something like this:
and so on.
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycl...Excel & Word auto selection from menus
Ok, I'm a keyboarder, not a mouser. I use quick commands
like the letter code or arrows on menus to speed along
without the grab, aquire, click business.
Excel & Word seem to be periodically (not always)
automatically selecting menu items based on prior
selections if I use arrow selectors. How do I turn this
off? I get no help from "Help".
Please reply to my e-mail address:
email@example.com. Thanks! Would love to get rid
of this nuisance & keep speeding along.
...select query of parent and child in one row
I have a parent table and a child table
one parent has between 1 and 6 children in the child table I wont a
query to have the parent and the child in one "row"
how do I create that?
thanks for helping me
Your table structure is not correct for a relational database but this will
get you there.
This has three but you get the idea and expand on it. Place the table in
the design grid as many times as you have field to combine.
SELECT MultipleFieldData.x, MultipleFieldData.a & IIf(MultipleFieldData_1.b
Is Null,Null," " & MultipleFieldData_1.b) & IIf(MultipleF...Clause order in SQL select query
Are there any rules that govern clause order? Does the
Obviously SELECT must be first but does WHERE have to
precede ORDER BY?
This question arises because I have a situation where
the VBA code would be easier if the WHERE could be the
final clause. That way I could have an unchanging
SELECT, FROM, ORDER BY string and just tag the WHERE; on
the tail. My thinking then turned to whether there is
a mandated order for other clauses too.
Is there an article somewhere to explain it?
remove nothing for v...Outlook 2003, selecting Contacts question, long post, Please give feedback
We are using Outlook to manage a rather large client base. (it's not the
best program for our use, but I'm not the boss) Right now the number stands
at 900, with a possible 500+ more by the time we're done entering.
I have to select clients each day and print them, 2 per page. I have to be
in Detailed View to get the info I need to print. The "clicking and
selecting" method is clumsy because if I click on the Initial column at the
far right, it de-selects those already selected. Most days, I need to print
20-30 pages, (40-60 clients)
I've resorted to just selecti...Opening a Word Merge and Selecting Its Data Source from Access
I have a form that runs data files for Word Merges that create cover letters
and floor plans (Word merges the data, and the actual floor plans are cut and
pasted from an interactive floor plan online) and then opens the Word Merge
documents. Currently I have each Word document hard-linked to a specific
file, and the code saves each query to its respective file. That works fine
if only one person is running the letters and floor plans. However, when we
are busy, we have multiple people doing the assigning of exhibitors, and each
is responsible for running the invoices, letters,...Letter Writing Assistant selection based on Smart List Lookup
We had a great opportunity to use the letter writing assistance to send out a
notice to any vendor used within the last 6 months. Using the smartlist
lookup up we can see those vendors we have issued a check to based on Last
Check date, but the Letter Writing Assistant only allows you to select
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the ...Select Case fails to fire with Data Users
Win2000 and Access 2003
I recently fixed the clutter of my form designs by going to a single
subform control and a tab control. The subform has a null source
object value which then gets loaded via the tab control's OnChange
Private Sub TabCtl_Change()
If Me.Dirty Then Me.Dirty = False
Select Case Me.TabCtl
Me.sfrmCtl.Visible = False
Me.sfrmCtl.Visible = True
Me.sfrmCtl.SourceObject = "sfrmLocationsLocationIDs"
Me.sfrmCtl.LinkMasterFields = "txtLocationID"
...TRANSACTION and SELECT *
I have a question about SQL Transactions:
For example, I have a table with 3 rows (ID 1, 2 and 3).
Now I insert a new row within BEGIN TRANSACTION, and I do not commit yet.
In another SQL Session, I try to select data.
When I do SELECT * FROM Table, it is blocked.
When I do SELECT * FROM Table WHERE ID = 2 I get a result.
How can I make SELECT * FROM Table possible even when
there is a open Transaction ? Of corse I only expect to get
the ID's 1, 2 and 3 back and not the new row.
I have looked about IsolationLevel, but this does not help.
Thanks for any comments ...When Select, do not download message
When i select a message at Outlook XP, Outlook will
download the message automatically. That was not
happened before. Sometime i need to remove 10 or 20
messages without downloading it, but when i select them,
it will take long time that outlook will first download
it. (the envloper icon is in full) How can i change
...Create a search folder to look at all emails in one folder and selected criteria in other folders
Is is possible to create a search folder that shows ALL the email in
the Inbox while only showing the unread email is other folders and
subfolders? I would like to use this as a modified Inbox.
I don't think you can do that since a search folder only allows one set of
<firstname.lastname@example.org> wrote in message
> Is is possible to create a search folder that shows ALL the email in
> the Inbox while only showing the unread email is other folders and
> subfolders? I wou...Msg Box does not return Correct Focus back to Dialog
I have a Dialog based Applcn.
on click of Btn1 of Dialog1, a new thread is generated & a Dialog2 is shown
In Dialog 2, again of click of Some Btn, Dlg3 is shown
In Dlg3, during data validation, when a MsgBox is shown using AfxMessageBox func, the focus does not return focus to Dlg 3, instead focus goes to Dlg 2
Thanks in adv
...selecting data from a list box
I have created a list box using the multi select function. What I would like
to do is be able to highlight multiple items(not in any particular order) in
the list box and then return their selection to cells M1, M2, M3 and so on.
I tried writing in a macro code to do this but it didn't seem to help. I
got the code from a previous posting but kep getting an error message about
the ME function:
Dim i As Long
Dim j As Long
For i= 0 To .List Count -1
j=j + 1
me.range("A" & j).Value = .List(i)
D...Marking Selected Time Frames on Charts
The task involves making comments about time periods where two to three line
graphs suggest something significant. First thought was to simply draw
vertical lines at the beginning and end of each time slice. But that
requires drawing and may require a more steady hand than mine. I'm looking
for something neat and fast. I like shaded areas for these time frames but
that seems to be just a refinement in the drawing function; I still have to
Any suggestions? I'm sure this is a pretty common issue that Excel probably
has the capability of handling with little effort... if I jus...Get Object ID of selected records
Is there any way to get object ID of all selected records from view. I
need to pass objectId of all selected records to 3rd part site in query
string on button click in CRM.
...Focus Change from Mailheader to body
Does anyone know how to catch the event from an inspector window (mail
message compose window) when the cursor is placed into the mailheader?
If I change the cursor from the mailheader to the body of the message,
Microsoft does disable the builtin formatting buttons, the are reactivated
when the cursor gets back into the body of the message.
I wish to use this same event disable/enable my custom buttons in the ribbon.
Anyone has an idea how to accomplish this?
You might use a timer, and check at intervall what's enabled. Here's a
sample for an API timer:
http://www.v...removing focus from the OK button on dialog app
I have a little dialog app that displays a message.
"blah blah... has been done to your computer..please click OK to BLAH
another thing to your computer". Because of the sensitivity of the
that is about to be done, I need to ensure the user doesn't accidently
press spacebar and launch the OK button by accident. I need to
OK button. Unfortunately the dialog application has only two things
the OK button and the CLabel field which displays the blah blah
I suppose there are two solutions, but I don't know neither and would
love your he...