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 Mike Lewis 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. WaterSprite

    VBA Project Sheet: ln39, col2

    Skip, thanks for the lesson. I have used ln/col as a locate feature, just wondered if it did anything else. Now I know.
  2. WaterSprite

    VBA Project Sheet: ln39, col2

    On the toolbar of the VBA project sheet, there is a box that lists the line number and column of each individual letter of code. Is it possible to use that line number in code, as an example: [Select Case aaaa2] [Case VbNo] [If aaaa2 = VbNo Then Resume ln39, col2]
  3. WaterSprite

    Set (15/1440) as a variable

    PHV, What finally worked, just now, was this: [Cells(5,1).formulaR1C1 = "=Sum(15/1440)"] [xx = Cells(5,1).value] [ActiveWorkbook.Names.Add Name:=("PB9"), _ RefersToR1C1:="=" & "!R" & aa & "C1:R" & b & "C1"] [Range("PB9").FormulaR1C1 = "=(R[-1]C1) + " & xx ] [Range("PB9").NumberFormat =...
  4. WaterSprite

    Set (15/1440) as a variable

    PHV, your solution worked perfectly. BTW, I think you gave me the named range code that I am using in this a couple of years ago. So, thanks for the named range code and for this new code. After I saw yours, I realized I had sort of been all around what you did, just never thought of moving...
  5. WaterSprite

    Set (15/1440) as a variable

    Dim x As Date, xx As Integer, thisTime As Date,Date1 As Date Dim y As Date, z As Integer, a As Integer, b As Integer, bb As Integer, aa As Integer With Activesheet Cells.Clear aa = 10 bb = 9 b = 384 Date1 = Format$(Date, "dd-mmm-yyyy hh:mm") Cells(9, 1).Value = Date1...
  6. WaterSprite

    Open OutLook2007 with VBA code

    I know this is probably the wrong forum for this question, but I do not know where else to ask. Is it possible to open E mail in Microsoft Outlook from an Excel Spreadsheet using a Macro?
  7. WaterSprite

    CurrentRegion.sort

    yes, but with 11,588 rows and 10 columns, it is not easy to check each row to see how the sort worked. The data I am being given to work with has been downloaded to Excel from something called "Crystal Reports", and I have had more than my share of trouble writing code that works. So, I thought...
  8. WaterSprite

    CurrentRegion.sort

    The Macro recorder gave me this: [Range("A1:K11588").Sort Key1:=Range("A1"),] The bottom row will not always be 11588, so, Can I replace the hard coded range with: [With Activesheet] [.cells(1,1).currentregion.sort]
  9. WaterSprite

    Count Pages Sent to the Printer

    I would like help with something like this: [If printout.page.count = 5 then Active.workbook.save else _ error in printout] The page count will always be 5, so I just want to be able to count how many times the print command has been sent to the printer at a given time.
  10. WaterSprite

    Using Variables with Edate

    [Dim x As Date, xx As Integer] [x = Cells(1, 1).Value] [xx = 12] [Cells(2, 1).FormulaR1C1 = "=Edate(R1C,R1C2)"] Can I use "Edate" with variables, as in the line of code below. If I could at least figure out how to use a variable for 12 it would help a lot. [Cells(2, 1).FormulaR1C1 =...
  11. WaterSprite

    Lost all my macros

    Fumei, I understand your concern with use of Flash Drives for long term storage. But that is not what I am doing. We have no physical connection between the computers we use at work and the outside world. So, anything I figure out at home, help I get from here or from the internet, I have to...
  12. WaterSprite

    Lost all my macros

    Skip, I am ready to learn something new. Tell me what to do. I found Export File. When I clicked on it, it took me to something called Office10. So, where do I need to export the module to and how do I reopen it if I need the code. And, can I export to a USB (Flash) Drive. Thanks. WaterSrite
  13. WaterSprite

    Lost all my macros

    Copy your code to NotePad as a text file, copy early and copy often.
  14. WaterSprite

    Format a Variable

    The reason I prefer to use code for the spreadsheets is that others use them and I have learned that if there are formula's in the individual cells, sooner or later someone is going to play with them. If I do everything in code, they can play all they want, but no permanent damage done. And...
  15. WaterSprite

    Format a Variable

    Thanks, just what I was hoping for. I will use the same idea and have the "NO" set in Red if it comes up. Thanks so much for the help.
  16. WaterSprite

    Format a Variable

    [Select Case aa13] [Case vbYes] [Cells(11, 2) = aa12 & aa36] [Case vbNo] [Cells(11, 2) = aa12 & ":No:" & aa38] [End Select] This code works just fine, it is from the help I received from a lot of you in the last couple of weeks, my Select Case question from 20 September 2010. Now, for my...
  17. WaterSprite

    Stop

    This is sort of a continuation of my Select Case question from 22 September, 2010. I took everyone's advice about not using input boxes for data entry. So, now my problem. I am using a drop down list in 3 cells for names to be selected from a preset list and placed in a cell. I am using...
  18. WaterSprite

    Select Case

    The following code works: Dim aa7 as string, aa8 as string aa7 = "Maintenance Notified:" aa8 = Inputbox(Maintenance Notified, Enter Yes, or No") if aa8 = "yes" then cells(8,2) = aa7 & chr(32) & aa8 This code does not work: Dim aa7 as string, aa8 as string aa7 = "Maintenance...
  19. WaterSprite

    Best way to store my VBA Code snippets

    I copy everything to NotePad, save it as a text file in a folder named, VBCodeSnippets. Works well, also serves as sort of a backup for me, even if I lost the spreadsheet, just build a new one, recopy the code from the text and I am back in business.
  20. WaterSprite

    Absolute Reference to current row

    [MyRow3 = Cells(Application.Rows.Count, 3).End(xlUp).Row + 8] [Cells(MyRow3, 3).Activate] [ActiveWorkbook.Names.Add Name:=("PB9"), _ RefersToR1C1:="=!RC3:RC16"] [Range("PB9").FormulaR1C1 = "=RANDBETWEEN(1,59)"] [Range("PB9").Interior.ColorIndex = 4] I thought in R1C1...

Part and Inventory Search

Back
Top