SCOTT LYERLY

  • Home
  • About
    • Contact
    • Bio
    • My Tourette Syndrome Story
  • Books
    • The Last Line
    • Anthologies
  • Other Writing
    • Short Fiction & Essays
    • Blog
  • Upcoming Events
  • Etcetera
    • Newsletter Sign-up
    • Privacy Policy
  • Facebook
  • Instagram
  • Threads
  • TikTok
  • Bluesky
  • Jan 23 Photo

    January 23rd, 2016

      
    A quick shot out my front door tonight. For a change, the snow storm is hitting everything south of us. My little slice of Massachusetts is going to get maybe an inch of snow. So far, this is the sum total of our snow. This includes leftover snow from a few weeks ago. 

    Taken with PureShot, and cropped, tuned, and bordered in Snapseed. 

  • Excel Geeking: Removing All Empty Sheets using VBA

    January 22nd, 2016

    You ever need to go through a workbook you’re working on and delete a bunch of sheets that have nothing in them? Maybe you’re creating a new automated report that requires you to plunk down a large chunk of data in a new workbook, but when you create that new workbook, it creates it with “Sheet1” and “Sheete2” and “Sheet3”. Yes, I know, you can change how many new sheets are present when you create a new workbook, but if you need to make your code portable, cause maybe somebody else will be running the report, and maybe that person has a backup in case they’re out with meningitis or something, and that person has an admin do it–well, you can lose track of your users pretty quick.

    And let’s be honest: a report, or some other workbook, that has a bunch of “Sheet2″s, “Sheet3″s, “Sheet4″s, and so forth, in it looks pretty amateur.

    Wouldn’t it be nice to have a nice clean little function that let’s you go through and blow away all the sheets in a workbook that are empty of data without having to do that manually? And that aren’t just named “Sheet1”, “Sheet2”, etc.? It sure would. But how might you do that?

    Wonder no more!

    Below is some code I worked up for just such a task. It bases its actions on whether the UsedRange property is a single cell, that cell being the very first cell in a worksheet. If that’s all there is to the UsedRange, then we’ll take a quick look at the length of the data in that cell. If the length of the data is zero, well then that cell is empty, and that means the sheet is empty. There for we can blow it away.

    As with most of my code, there is probably a better way of doing this. But this is what I landed on and it works beautifully (for me, at least). If you have a better method, chime in, I’d love to see how you tackled it.

    Sub RemoveEmptySheets()
    '   This deletes any sheet that has nothing in it.
    
        ' Variable declarations.
        Dim sh  As Worksheet
    
        ' Loop through all the sheets in the active workbook.
        For Each sh In ActiveWorkbook.Worksheets
    
            ' Perform two tests: checking if the used range is the very first cell,
            ' then checking to see if the lenght of hte cell contents is zero, meaning
            ' the cell is empty.
            If sh.UsedRange.Address = "$A$1" Then
                If Len(sh.Range("A1").Value) = 0 Then
    
                    ' Delete the sheet.
                    Application.DisplayAlerts = False
                    sh.Delete
                    Application.DisplayAlerts = True
    
                End If
            End If
    
        Next sh
    
    End Sub
    
    
  • Jan 22 Photo

    January 22nd, 2016

      
    Today’s photo is what I think of as a “playing around” photo, where you take a picture and play around with it until you come up with something fun or goofy or both. 

    If you’re in my age bracket, you went to birthday parties in the 70s and 80s and invariably somebody had a Polaroid camera. You may not have known this, but Polaroid developed a photo app, Polamatic, which you can get in the App Store. It’s a pay app, but it can be a ton of fun. 

    January and February is birthday season in my house, which means we have birthday paraphernalia lying around in various states of use. Take this package of birthday candles, for example. I liked the look of the package of candles with one missing. But by itself, it’s a kind of uninteresting image. 

    That’s were the Polaroid app comes in. After a few touch ups in Snapseed, mainly just cropping and rotation, I imported the image into Polamatic. From their you can chose the kind of Polaroid film you want to use, any filtered effects, and the border of the picture. 

    The end result? A birthday image straight out of the 70s. 

  • Jan 21 Photo

    January 21st, 2016

      
    This is a shot of a quilt my mother made for my in-laws at the request of my mother-in-law. My mother is a very accomplished quilter, which is made more impressive when you learn that she’s legally blind. She lost a huge amount of vision twenty-some years ago. Yet, she loves quilting and refused to give it up. She opened her own business quilting the backings onto quilt tops with a sewing machine called a long-arm. She has more swatches of cloth than a Joanne’s Fabric, so much cloth that she actually said, “I don’t need any more gift cards to Joanne’s, there’s nothing more I need to buy there.”

    This particular quilt is called (I think) a wedding ring quilt and covers the king sized bed in the bedroom where my wife and I sleep whenever we visit my in-laws. The patterns you see in-between the rings is a stitched pattern that repeats over and over. It always boggles my mind how much work must go into making one of these things. 

  • Jan 20 Photo

    January 20th, 2016


    I’m still getting the hang of using clip-on lens for my iPhone. This one picture was taken using a macro lens from CamRah. I figured  since Alexander Hamilton is suddenly in the public’s eye once again, why not take a macro picture of a ten dollar bill? It’s not great, blurry at the bottom, but I do like how the macro lens provides detail you simply could not get before in an iPhone lens. The little red and blue threads that qualify our paper money as cloth finally stand out to the point where I can see them.

  • Jan 19 Photo

    January 19th, 2016

      
    Last picture from my New York trip. Just about to head over the Whitestone Bridge. 

    Shot with Hipstamatic. 

  • Jan 18 Photo

    January 18th, 2016

      
    Another shot from my trip down to New York. This one taken with Hipstamatic. Like I said yesterday, really fantastic skies in the way down. 

  • Jan 17 Photo

    January 17th, 2016

      
    Went to visit some family this weekend in New York. The skies on the way down were nothing short of awesome. This is a view of Manhattan from the Whitestone Bridge. 

    Taken with PureShot and cropped and tuned slightly with Snapseed. 

  • Jan 16 Photo

    January 16th, 2016

      
    I’ve lived in New England now for about 18 years. The last few winters have been exceedingly snowy. I can say pretty much that I’m no longer a big fan of the white stuff. This winter we haven’t had much yet. But the snow didn’t really start last winter until late January, so I’m not holding out hope against the snow. Not yet. 

  • Jan 15 Photo

    January 15th, 2016


    When I first started getting interested in the idea of iphoneography, that is, photography taken and edited solely with iPhone apps, the toy camera app Hipstamatic came up A LOT. I’m a sucker for that kind of stuff, so I downloaded Hipstamatic and have bought some of its “lens” and “films”.

    I find Hipstamatic frustrating at times. There are so many combinations of lens and films you can use, it’s hard to know which one is the best for the picture you’re trying to take. Either you decide on a combination and the picture doesn’t come out the way you hoped, or you figure out the right combination just in time for the subject of the photo to have moved on.

    But once in a while, it just works. Example: see the sunset photo above.

←Previous Page
1 … 22 23 24 25 26 … 41
Next Page→

Create a website or blog at WordPress.com

  • Subscribe Subscribed
    • Scott Lyerly
    • Join 200 other subscribers
    • Already have a WordPress.com account? Log in now.
    • Scott Lyerly
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar