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 60
Search took 0.01 seconds.
Search: Posts Made By: shattered
Forum: Excel VBA February 1st, 2006, 04:42 AM
Replies: 2
Views: 1,134
Posted By shattered
Can you post yoru actual macro, it should be...

Can you post yoru actual macro, it should be faily simple to sort out. I suspect its having a problem knowing which sheet to actually rename once you create a new one but without seeing your code I...
Forum: Excel VBA December 29th, 2005, 04:52 AM
Replies: 6
Views: 3,464
Posted By shattered
You just need to add an else clause to the...

You just need to add an else clause to the original code..

Else
Sheets("Sheet2").Cells(i, 5) = Sheets("Sheet1").Cells(i, 4)

giving you

Sub WriteData()
Dim i As Integer
i = 1
Forum: Excel VBA December 20th, 2005, 03:58 AM
Replies: 1
Views: 1,389
Posted By shattered
well, step 1 should be to check and see if the...

well, step 1 should be to check and see if the system is using all resources, task maanger will tell you that

step 2 would be to reproduce the macro here and we can see if it can be made less...
Forum: Excel VBA December 19th, 2005, 11:35 AM
Replies: 2
Views: 1,433
Posted By shattered
in the file itself is corrup there are lots of...

in the file itself is corrup there are lots of ways to restore the data, but no good ways to get the vba data back - most methods (including loading through a text editor) will only allow you to...
Forum: Excel VBA December 19th, 2005, 11:26 AM
Replies: 1
Views: 920
Posted By shattered
depends on how the data is stored - if its in...

depends on how the data is stored - if its in date format then its a simple case of comparing one date to the other

With Sheets("Sheet1")
If .Cells(2, 2).Value < .Cells(2, 3).Value Then...
Forum: Excel VBA December 19th, 2005, 11:18 AM
Replies: 3
Views: 1,595
Posted By shattered
Sub TestData3() sPath = "C:\TestData\" '...

Sub TestData3()
sPath = "C:\TestData\" ' Directory containing files
sSplit = "|" ' Delimiter character
sFileName = Dir(sPath)
Do Until Len(sFileName) = 0
If (sFileName <>...
Forum: Excel VBA December 19th, 2005, 10:15 AM
Replies: 2
Views: 996
Posted By shattered
hmm, wondering if your a little confused here... ...

hmm, wondering if your a little confused here...
The Microsoft Internet Controls should be in your refernces list by default (shdocvw.dll) - just click on tools in the VBA editor, select references...
Forum: Excel VBA December 19th, 2005, 10:10 AM
Replies: 3
Views: 5,033
Posted By shattered
another way would be to check the number format...

another way would be to check the number format along the lines of

InStr(1, ActiveSheet.Range(sRange).NumberFormat, "$") > 0

and process accordingly - that should pick up all curencies..
Forum: Excel VBA December 19th, 2005, 09:33 AM
Replies: 3
Views: 5,033
Posted By shattered
You can check for currency by checking to see if...

You can check for currency by checking to see if VarType(Cell Value) = 6

In tests however there is a flaw in this plan, in that it only seems to recognise the values in £ - if you use the $...
Forum: Excel VBA December 16th, 2005, 09:28 AM
Replies: 8
Views: 12,878
Posted By shattered
thats a very open question? Often the best way...

thats a very open question? Often the best way to speed a macro up (apart from teh above) is to review the macro code itself and look at ways to optimise it.

You could always post the macro here...
Forum: Excel VBA December 16th, 2005, 07:37 AM
Replies: 1
Views: 995
Posted By shattered
Ok, first up, I wouldn't usually do this with...

Ok, first up, I wouldn't usually do this with code, I'd either use Excels built in subtotals or a pivot table - you might want to consider that..

Anyway, that aside, here is some code that will do...
Forum: Excel VBA December 5th, 2005, 06:51 AM
Replies: 1
Views: 1,485
Posted By shattered
If I understand the question correctly... ...

If I understand the question correctly...

Put this in the worksheet..

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.OnKey "{TAB}", "IncrementNum"
End Sub

And...
Forum: Excel VBA December 5th, 2005, 06:33 AM
Replies: 2
Views: 1,421
Posted By shattered
' Method 1 Function RightLen(sText As String)...

' Method 1
Function RightLen(sText As String) As Integer
If Len(sText) = 6 Then
RightLen = Left(sText, 4)
Else
RightLen = sText
End If
End Function

' Method 2
Forum: Excel VBA November 28th, 2005, 09:08 AM
Replies: 2
Views: 1,892
Posted By shattered
if your not sure about digital signatures there...

if your not sure about digital signatures there is an excellent article here which should help..

http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=194
Forum: Excel VBA November 28th, 2005, 09:02 AM
Replies: 2
Views: 1,892
Posted By shattered
your easiest option is probably going to be...

your easiest option is probably going to be self-signed digital certificates. Digital signatures are faily easy to set up and as long as they are stored in a trusted location users can open any...
Forum: Excel VBA November 24th, 2005, 03:43 AM
Replies: 17
Views: 3,587
Posted By shattered
still shouldn't make any difference, ran the code...

still shouldn't make any difference, ran the code in excel 2003 without difficulty.. Have you modified the code at all - can your paste your exact code here if its not the same as above.
Forum: Excel VBA November 23rd, 2005, 12:31 PM
Replies: 17
Views: 3,587
Posted By shattered
ok, confused now, if you open a new workbook and...

ok, confused now, if you open a new workbook and type the above data into columns 1, 17 & 21 and then run the macro it works for me without any problem at all..

can you try the code in a new...
Forum: Excel VBA November 23rd, 2005, 11:45 AM
Replies: 17
Views: 3,587
Posted By shattered
you might also want to consider sending me the...

you might also want to consider sending me the data you are manipulating. The code seems to work fine on the test versions I've done so there must be something that we are missing..
Forum: Excel VBA November 23rd, 2005, 11:38 AM
Replies: 17
Views: 3,587
Posted By shattered
ok, so it appears to die on the first pass.. ...

ok, so it appears to die on the first pass..

Is either sheet protected?
Are the cells you are copying from or to merged at all?
Forum: Excel VBA November 23rd, 2005, 10:57 AM
Replies: 2
Views: 1,394
Posted By shattered
Private Sub CheckRange() Dim iContinue As...

Private Sub CheckRange()
Dim iContinue As Integer
Dim iNext As Integer
For iContinue = 1 To 13
If IsEmpty(Range("Range" & iContinue)) Then
Select Case iContinue
Case 1
ShowMsg "[SUBJECT]",...
Forum: Excel VBA November 23rd, 2005, 07:09 AM
Replies: 8
Views: 1,707
Posted By shattered
thats kinda hard because everything I do is for a...

thats kinda hard because everything I do is for a specific task - so for example one of the excel projects was to import data from sage, break it down, spit out the results to a series of seperate...
Forum: Excel VBA November 23rd, 2005, 06:23 AM
Replies: 8
Views: 1,707
Posted By shattered
guess it depends on the company your are applying...

guess it depends on the company your are applying to, when I last went for an interview I was quizzed on a number of subjects ranging from importing and parsing data (csv, mdb, html, xml and a few...
Forum: Excel VBA November 23rd, 2005, 03:48 AM
Replies: 8
Views: 1,707
Posted By shattered
um, a little confused? what exactly are you...

um, a little confused? what exactly are you asking for? help with applying for a job?
Forum: Excel VBA November 22nd, 2005, 12:46 PM
Replies: 17
Views: 3,587
Posted By shattered
sorry, it changed to print beacuse you typed it...

sorry, it changed to print beacuse you typed it in the code window, should have said I wanted you to type in the immediate window.

Click to the left of the line with the problem to set a...
Forum: Excel VBA November 21st, 2005, 03:49 AM
Replies: 5
Views: 1,678
Posted By shattered
well if sData was the variable containing the...

well if sData was the variable containing the word you wanted stripping (for example "don't" then you woould have something like

sNewWord = symrem(sData)

That would pass the value of the...
Showing results 1 to 25 of 60

 


All times are GMT -4. The time now is 03:12 PM.


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