Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Search Forums
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Showing results 1 to 25 of 163
Search took 0.01 seconds.
Search: Posts Made By: allenm
Forum: Excel VBA December 20th, 2012, 07:27 PM
Replies: 1
Views: 3,500
Posted By allenm
To 0 pad a number just do something like this...

To 0 pad a number just do something like this within your code:


'The following line makes sure integer is 3 digits long and places it in a string
Dim sMyString As String
sMyString =...
Forum: Excel VBA December 20th, 2012, 07:07 PM
Replies: 5
Views: 885
Posted By allenm
Did you put the code in a Module or in your...

Did you put the code in a Module or in your spreadsheet? My guess is you're working with code in a module. Me is a reserved reference to the object your coding in. IF you are putting the code in a...
Forum: Excel VBA December 19th, 2012, 05:00 PM
Replies: 1
Views: 2,298
Posted By allenm
Why not take care of this with a formula? Place...

Why not take care of this with a formula?
Place this formula in cell C1:
=HYPERLINK("MoreInfo\ORDERS\" & A1 & "\" & B1)

You can populate it down as far as you wish to go. If you want Excel to...
Forum: Excel VBA December 19th, 2012, 04:07 PM
Replies: 1
Views: 2,483
Posted By allenm
The problem is that what you're placing as your...

The problem is that what you're placing as your formula in the cell is exactly what is between the quotes.

Let us assume LookupValue contains "f100". The way you have your variable set up, your...
Forum: Excel VBA December 19th, 2012, 03:36 PM
Replies: 5
Views: 885
Posted By allenm
There are a lot of ways of accomplishing this...

There are a lot of ways of accomplishing this task. There needs to be more specific instructions on what you really want to accomplish to let programmers responding to you know what you are doing...
Forum: Excel VBA September 9th, 2010, 02:56 PM
Replies: 3
Views: 1,192
Posted By allenm
You need a Worksheet_Change function on that...

You need a Worksheet_Change function on that worksheet if you want it to update itself when the cell contents change.

IF I'm understanding right then your code should be something like this:
...
Forum: Access August 27th, 2010, 04:03 PM
Replies: 2
Views: 3,529
Posted By allenm
Is this for a form filter to be set when you...

Is this for a form filter to be set when you first load a form? Instead of using a query for this I'd just set form parameters on load. To make it static (not removable by turning off or clearing a...
Forum: Access VBA August 27th, 2010, 03:04 PM
Replies: 1
Views: 836
Posted By allenm
There are a couple of ways you can do this. I...

There are a couple of ways you can do this. I think what you want is anything containing the entry in the comment field of a form? Then it would be:


If [Forms]![frm_SpecificInfo]![Comments] <>...
Forum: Excel VBA August 25th, 2010, 05:22 PM
Replies: 3
Views: 1,192
Posted By allenm
Are there 2 cells that have a time in them? you...

Are there 2 cells that have a time in them? you could just make this a simple formula. A1 is time in, B1 is time out. This is my C1 formula.

=If(U4="O","",INT(B1-A1) * 24 + HOUR(B1-A1) +...
Forum: Excel VBA August 18th, 2010, 04:34 PM
Replies: 2
Views: 1,180
Posted By allenm
Interesting way to accommodate for date data...

Interesting way to accommodate for date data types.

This is how I handled it:

Create a module and place the actual functionality below there. no point in having replicated data due to template...
Forum: Excel VBA August 17th, 2010, 06:07 PM
Replies: 3
Views: 2,099
Posted By allenm
I'd do that a bit differently, myself. This...

I'd do that a bit differently, myself.

This is how I would code it:

Public Function SumsOverZero(wsSource As Worksheet, iColNumberToCheck As Long) As Boolean

'Returns True if column contains...
Forum: Excel VBA March 18th, 2010, 06:39 PM
Replies: 2
Views: 9,354
Posted By allenm
Well, Not sure what exactly you're looking for...

Well, Not sure what exactly you're looking for but try this simple code sample with 5 columns and 7 rows (including heading row):

Public Sub MakeChart()

'Creates a table on current data 7 rows...
Forum: Excel VBA March 10th, 2010, 06:22 PM
Replies: 1
Views: 24,436
Posted By allenm
Using Match with a match type of 0 will return a...

Using Match with a match type of 0 will return a cell error if the value isn't found. In VBA this results in an error that will halt your code. If you want to use a spreadsheet function to do the...
Forum: Access VBA November 9th, 2009, 07:18 PM
Replies: 3
Views: 3,295
Posted By allenm
Let's assume you want to find [Your_Value] in...

Let's assume you want to find [Your_Value] in MatchingField_Name and wish to return ReturnField_Name. You would set the text box Control Source to:...
Forum: Excel VBA September 28th, 2009, 10:04 AM
Replies: 2
Views: 2,099
Posted By allenm
Time literals in VBA are enclosed with # signs...

Time literals in VBA are enclosed with # signs and must be appropriately stated. #12:00 AM# is the same as adding 0 to whatever time you already have so try adding as such:


Dim dTime As Date...
Forum: Excel VBA September 28th, 2009, 09:52 AM
Replies: 4
Views: 2,601
Posted By allenm
Okay, this should accomplish what you need to do....

Okay, this should accomplish what you need to do. The problem comes in where you don't want every column floating to the topmost for each record. These you need to treat as a group for moving so it...
Forum: Excel VBA September 24th, 2009, 06:35 PM
Replies: 4
Views: 2,601
Posted By allenm
There seems to be certain lines that don't get...

There seems to be certain lines that don't get inherited to the last listed 'item' in a list. For instance, the 0 inherits to the model S280M ABBB2 for Fuel System but the ALL beneath that in...
Forum: Access VBA August 31st, 2009, 06:27 PM
Replies: 1
Views: 1,235
Posted By allenm
Just open your own instance to a joined recordset...

Just open your own instance to a joined recordset and pull the values for both directly instead of having to touch each form. Let the engine do the work for you.

The 1 thing you need to remember...
Forum: Excel VBA August 28th, 2009, 06:01 PM
Replies: 4
Views: 34,305
Posted By allenm
Set reference to Microsoft DAO 3.6 Object Library...

Set reference to Microsoft DAO 3.6 Object Library
You need to know your connection string options which are somewhat finicky but the code would look something like:

Dim dbConnect As Database,...
Forum: Excel VBA August 25th, 2009, 07:11 PM
Replies: 1
Views: 1,368
Posted By allenm
Try this sample: Public Sub addchart() ...

Try this sample:


Public Sub addchart()

'This sample adds a chart to the current sheet. The named parameters will hopefully make it easier to understand.
Dim ch As ChartObject, iLeft As...
Forum: Excel VBA August 4th, 2009, 07:12 PM
Replies: 1
Views: 1,314
Posted By allenm
Not exactly sure what you are trying to do......

Not exactly sure what you are trying to do... copy to another sheet? Just place in clipboard?

To just place the filtered information in the clipboard, I guess you could do this:

Range("a1:f" &...
Forum: Javascript July 27th, 2009, 06:43 PM
Replies: 1
Views: 798
Posted By allenm
Not quite sure what you are going for, but try...

Not quite sure what you are going for, but try this code instead:

function GetMousePossition(e)
{
var bIsIE = navigator.appName=="Microsoft Internet Explorer";
var iMouseX = 0;
...
Forum: Excel VBA June 26th, 2009, 11:00 AM
Replies: 1
Views: 1,131
Posted By allenm
Very interesting. Not sure it's effective to...

Very interesting. Not sure it's effective to code around training issues. Still, a very interesting scenario.

Okay, this one is a little tricky and requires a bit of tricky coding to work around...
Forum: Excel VBA June 9th, 2009, 03:43 PM
Replies: 4
Views: 8,891
Posted By allenm
By default comparisons are done binary (Case...

By default comparisons are done binary (Case Sensitive). This can be changed for most VBA functions.

Change the line:
iSeek = InStr(1, rCell.Value, sToFind)
To This:
iSeek = InStr(1,...
Forum: Excel VBA June 9th, 2009, 01:53 PM
Replies: 4
Views: 8,891
Posted By allenm
That seems like a lot of effort for what you wish...

That seems like a lot of effort for what you wish to accomplish. Below is some sample code I put together that processes a range of cells marking every instance. Modify it as needed to fit your...
Showing results 1 to 25 of 163

 


All times are GMT -4. The time now is 10:55 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.