none
Application.SendKeys "^tab" RRS feed

  • Question

  • i am new to this, and i can not seem to get CTRL+TAB to work

    i am trying to change printer settings to color using send keys, but my printer options have 4 tabs on the top.

    the only way i know to select the correct tab without using a mouse is ctrl tab.

     

    any help please?

    Tuesday, October 4, 2011 11:53 PM

Answers

  • Another solution is to install a second time your printer with different options.
      Select Start, Settings, Printers, select Add Printer
     you add the printer again you have, but giving it another name "NewPrinter1".
      once done, by right click on the printer you just created and chosen
     property then General tab, print option
     
    now you use this new printer in your code
     
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=True, ActivePrinter:="NewPrinter1", Collate:=True
     
    --
    isabelle
     
    • Marked as answer by whitemoon75 Wednesday, October 5, 2011 11:13 AM
    Wednesday, October 5, 2011 2:24 AM

All replies

  • hi,
     
    SendKeys "^{TAB}", True
     
    --
    isabelle
     
    Wednesday, October 5, 2011 12:06 AM
  • i dont get any errors using that, but it still does not do what i need.

    Sub TEST()
    '
    ' TEST Macro
    SendKeys "%fpr", True
    SendKeys "^{TAB}^{TAB}", True
        Range("A1").Select
    End Sub

    is what i have in excel so far

    the first time i hit my button it does not go to the correct screen, when i hit esc to go back to the workbook and press the same buttom it opens my printer options, but will not tab to the correct window.

    when i do it manually on the keyboard it works fine, something seems to be missing from my macro to make it work i think.

    thanks!

    Wednesday, October 5, 2011 12:31 AM
  • if you want to print in color
     
    Worksheets("Sheet1").PageSetup.BlackAndWhite = False
     --
    isabelle
     
     
    Wednesday, October 5, 2011 1:33 AM
  • Another solution is to install a second time your printer with different options.
      Select Start, Settings, Printers, select Add Printer
     you add the printer again you have, but giving it another name "NewPrinter1".
      once done, by right click on the printer you just created and chosen
     property then General tab, print option
     
    now you use this new printer in your code
     
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=True, ActivePrinter:="NewPrinter1", Collate:=True
     
    --
    isabelle
     
    • Marked as answer by whitemoon75 Wednesday, October 5, 2011 11:13 AM
    Wednesday, October 5, 2011 2:24 AM