Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. MadForIt

    Using Inet1.Cancel in Excel

    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...
  2. MadForIt

    Excel File Save As using Cell Value Info

    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...
  3. MadForIt

    Out of stack space using Instr

    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!!
  4. MadForIt

    Out of stack space using Instr

    Chance1234 Would it be possible for you to post your code, as i must be doing something wrong! Thanks in advance.
  5. MadForIt

    Out of stack space using Instr

    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.
  6. MadForIt

    Out of stack space using Instr

    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...
  7. MadForIt

    Excel VB Code Execution Speed. Puzzled!!!!

    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()...
  8. MadForIt

    Excel VB Code Execution Speed. Puzzled!!!!

    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...
  9. MadForIt

    I have put a combo button on a form

    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
  10. MadForIt

    Address of Range

    Thanks Nath thats just what i need.
  11. MadForIt

    Address of Range

    Hi Is it possible to return the address of the upper left cell in a range? i.e. Range("B14:F100") I just need it to return B14 Cheers.
  12. MadForIt

    Reducing Size Of Excel Recorded Macro Through VB!

    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
  13. MadForIt

    Help with Excel formulas

    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
  14. MadForIt

    Using Excel SumIf Command in VB6

    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...
  15. MadForIt

    Using Excel SumIf Command in VB6

    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.
  16. MadForIt

    Refresh Excel formula results???

    Hi, Have you tried pressing the F9 key. Or turning on Automatic recalc. Tools/Options/Calculation tab. Rgds
  17. MadForIt

    Make Excel code execute after TransferSpreadsheet

    Hi Shaun, As far as i'm aware Auto_Open macros do not run automatically if the files are opened by VB code. I had a similar problem using VB with Excel to open another spreadsheet which had an Auto_Open macro. This also didn't Auto run. To get around this i had to use the RunAutoMacros...
  18. MadForIt

    Listing Folder names in excel

    Hi, Thought i might as well post the code anyway. Rgds. Sub Folders() Sheets("Sheet1").Cells.ClearContents Cells(2, 1) = "C:" First = 2 Last = 2 For Level = 1 To 4 For j = First To Last Path = Cells(j, 1) FileName = Dir(Path & "\", 22)...
  19. MadForIt

    Listing Folder names in excel

    Hi Geoff, Think i've nearly cracked this. Unfortunately i have left the code at work. Will get back to you soon. Rgds
  20. MadForIt

    TROUBLE WRITING TO A CELL IN EXCEL

    Hi, Need to know a bit more of your code. What values does casenum use? Also what are the ranges of your named cells DBUSED,DBUSEDQUICK and CASEDATA i.e, C2:E500 etc?

Part and Inventory Search

Back
Top