Consulting

Results 1 to 9 of 9

Thread: Macro required for ALT+TAB keys

  1. #1

    Macro required for ALT+TAB keys

    Hi all,

    I have to fill some numeric digits in Excel sheet. I have 1000 images. Each image is containing 6 digit number. By viewing the image i need to type that 6 digit number in Excel sheet. Usually i will open image with 'Image viewer'. Normally first i open 1st image and then i will press ALT+TAB. Then it goes to Excel Sheet, here i will type 6 digit number. Again I will press ALT+ TAB. then it goes to image Viewer, then i will press 'Right arrow key', then it goes to next image. Again i will press ALT+TAB. So here My requirement is With out using ALT+TAB, After typing the 6 digit number in excel sheet and whenever i press the 'ENTER', the image viewer has to show next image. Is there any macros available for these type of reqirements. Can u any body please help me in this issue.

  2. #2
    VBAX Tutor lynnnow's Avatar
    Joined
    Jan 2005
    Location
    Mumbai, Maharashtra, India
    Posts
    299
    Location
    Do the images have the numbers in them or are the images' file names a 6 digit number? If the file names are 6 digit numbers the solution will be different and much easier than what you are doing. Please elaborate.

  3. #3
    Tqs lot for reply, I need not to type Image file name. I have to type 6 digit number which is inside the image. Image file name and 6 digit numbers both are diffirent.

  4. #4
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Welcome to VBAX
    Here's a small utility to try. This will list all the jpg files in a selected folder and show the images in turn as you select a cell to insert the number.
    Regards
    MD
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  5. #5
    VBAX Tutor lynnnow's Avatar
    Joined
    Jan 2005
    Location
    Mumbai, Maharashtra, India
    Posts
    299
    Location
    Absolutely fabulous mckillop.

    I was working on something similar, however, i used a userform and still needs a load of work (given my limited coding capability)

    I've attached it here, and may need tweaking (quite some) since i have not taken care of the error handlers.

    Also i noticed that the images can actually go beyond the boundaries of the screen and it can be a hassle scrolling around the worksheet to see the number if the image is quite large. My question is, can the images be resized to some extent so that the whole image is viewed on the current screen or with minimal scrolling to be done?

    Love what you tried tho.

    Lincoln

  6. #6
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Lynn
    I've done a few things with phots in Excel including this KB Item which includes a resizing facility.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  7. #7
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Sizing added
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  8. #8
    VBAX Tutor lynnnow's Avatar
    Joined
    Jan 2005
    Location
    Mumbai, Maharashtra, India
    Posts
    299
    Location
    @Mackillop:

    I got an "Unable to get the Pictures property of the Worksheet class" error on

    [VBA]ActiveSheet.Pictures(1).ShapeRange.Width = _
    Target * (GetSystemMetrics32(0) - Range("E1").Left)[/VBA]

    Am I missing some class module?

    Lincoln

  9. #9
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    The error was because there was no picture to provide the data. I've reposted the file with error handling added.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

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