Hi,
Does anyone know if there is a bug in the Excel version of VBA when using the Internet Transfer Control? I am trying to issue the Inet1.Cancel command which when compiled gives me the "Invalid use of property error".
When i type Inet1.Cancel the Cancel shows up as a property and is...
Hi rjm65
If the SaveAs dialog box is not required you could try something like this.
Sub PO_Save()
DirName = Sheets("PO").Range("B1")
SuggName = Left(DirName, 5) _
& ("_") & Application.Text(Now(), "mmddyy") & "_" & Application.Text(Now(), "hhmm") & ".XLS"
On Error Resume Next...
Chance1234
Still comes up with an error on mine. Must be just the combination of Excel97 and Win95/98 as i have just tried it with Excel97 on an NT machine, without the DoEvents and Screen updating False/True, and it works fine!
Think i might give up!!
Thanks Chance1234. Did you get it to work okay on your system using your suggestions, as the error still occurs on mine.
Thanks.
PS I know it works okay using Excel 2000, so it must be a bug in Excel 97.
Hi, Can anyone suggest why the following code behaves as it does. When run for the first time i get an 'Out of Stack Space' error. If i End the code and run it again any number of times thereafter it runs okay! Any ideas plus possible solutions to rectify would be most appreciated. I am running...
Hi.
Have answered my own question. It must be something to do with screen updating. Writing to the sheet that is selected constantly updates the screen and therefore slows down code execution. Changing Test1 to read as follows makes the code run at the same speed as Test2 does.
Sub Test1()...
Hi.
Can anyone please explain to me why the code in Test1 takes 3 times longer to execute than Test2? Unless i am missing something here it appears that it is better to select a sheet other than the one that you want to work with!
Cheers.
Sub Test1()
St = Now()
Sheet2.Select
For i = 1 To...
Hi Laurafinn,
I had the same problem. As you say the dates in the drop down appear okay, but the one you select changes to a number. The only way i got it to work was to precede the dates on the worksheet with an apostrophe '.
Rgds MadForIt
Single cell copying can also be written using a shortcut
[I1] = [J1]
To put the zero's onto your worksheet
[C2] = 0
Also get rid of the Application.CutCopyMode = False
Hi,
You could try using the SUMIF formula.
Eg.
=SUMIF(A:A,"Business",B:B)
=SUMIF(A:A,"Commute",B:B)
Where A:A is the range where your Categories are stored and B:B is the range where your Milages are stored.
Regards
Joel009,
Not sure how you are creating your xlApp object. Assuming Excel is already running this code works on my machine.
Rgds.
Dim xlApp As Object
Set xlApp = GetObject(, "Excel.Application")
Dim Range1 As Range
Dim Range2 As Range
Dim Range3 As Range
Dim dblNew As Double...
Hi,
You have to access this via the WorksheetFunction command
Eg.
Result = Application.WorksheetFunction.SumIf(Range("a1:a100"), "ABC", Range("b1:b100"))
There are many worksheet functions that can be accessed this way.
Rgds.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.