Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: Saving VBA Code And A Counter

  1. #21
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    arasH, oncE yoU havE thE codE anD havE handeD iT iN (iN lesS thaN 12 hourS timE), dO yoU wanT mE tO comE rounD anD chiN youR tutoR?

  2. #22
    Board Regular Steve Hartman's Avatar
    Join Date
    Feb 2002
    Location
    Houston,Texas
    Posts
    417
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    one more thing what CD writing software will you be using

  3. #23
    Board Regular
    Join Date
    Mar 2002
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    it doesn't matter but Nero

  4. #24
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    OK, I think I've got you now.


    Here's a quick link to opening the Excel workbook for access to read and write.

    http://www.mrexcel.com/board/viewtop...ic=671&forum=2

    Instead of doing msgbox "The value is" you'll want to stick some code in like:


    'Copy and paste the range:
    Sheets("Sheet1").Range("A1:G48").Copy Destination:=wkbk.Sheets("Sheet1").Range("A1")


    Obviously you'll change this code to refer to the actual workbooks and ranges you'll use.

    To do the 250 times bit. You'll need to find a nice empty cell somewhere on your spreadsheet where the user wont easily find it.

    When the button is clicked, stick this code at the front of your macro:


    Sheets("Sheet1").Range("IV65536").value = Sheets("Sheet1").Range("IV65536").value + 1

    if Sheets("Sheet1").Range("IV65536").value = 250 then msgbox "hi I've been opened 250 time, by someone copying Arash the moronic A Level student's ideas for writing data to removable media."


    that should work. Anyway, I need to fly now. If you've got any problems, I'll be back on Monday. Take it easy.


  5. #25
    Board Regular Steve Hartman's Avatar
    Join Date
    Feb 2002
    Location
    Houston,Texas
    Posts
    417
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Arash whoos Arash this says it Morrissey

  6. #26
    Board Regular Steve Hartman's Avatar
    Join Date
    Feb 2002
    Location
    Houston,Texas
    Posts
    417
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-21 13:47, Morrissey wrote:
    it doesn't matter but Nero
    So you not controling the writing of CD from excel just wnat a reminder to manually copy you data



    Why not just ask someone to do your project for you and then you won't have to mess with it at all? That's the route Arash would have taken.

    [ This Message was edited by: Steve Hartman on 2002-03-21 14:07 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •