Search:

Type: Posts; User: Kenneth Hobson; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.13 seconds.

  1. Replies
    4
    Views
    113

    Re: VBA PDF Export printing 1 page

    The normal method is to set the print area and then publish the worksheet to pdf but you can use a range to override the print area.

    You commented out the width setting.

    You can set the print...
  2. Re: Application.SendKeys "{TAB 2}" does not work

    Have you tried sending a single tab key?

    In some other programming languages, I found outside SendKeys() methods did better. I also found that sending one key at a time worked better in some...
  3. Replies
    16
    Views
    295

    Re: StDev Macro

    I have not tested it but maybe:

    Sub Main()
    Dim c As Range, r As Range
    Set r = Range("A2", Cells(Rows.Count, "A").End(xlUp))
    For Each c In r
    If Application.CountA(c.Offset(,...
  4. Replies
    16
    Views
    295

    Re: StDev Macro

    One method, use Application.CountA to count the 6 cell range. If 0, Goto the next i...
  5. Re: Application.SendKeys "{TAB 2}" does not work

    I avoid SendKeys() solutions as-much-as possible. It is all about timing and focus. Besides a time wait, one can do a loop wait if one knows the Window's handle. That can be found by API routines...
  6. Replies
    4
    Views
    113

    Re: VBA PDF Export printing 1 page

    Sheet2.PageSetup.FitToPagesTall = 1

    I suspect that your real or additional problem is:

    .Range("T1:AC1" & Cells(Rows.Count, "T").End(xlUp).Row).Name = "PDFRng"
  7. Replies
    16
    Views
    295

    Re: StDev Macro

    Sub Main()
    Dim c As Range, r As Range
    Set r = Range("A2", Cells(Rows.Count, "A").End(xlUp))
    For Each c In r
    'Weighted Average/Mean
    c.Offset(, 2) = wAvg(Array(6, 5, 4, 3, 2, 1),...
  8. Replies
    16
    Views
    295

    Re: StDev Macro

    Why do you need a macro? Formulas can do it.

    I did make macro UDFs to do the weighted average and weighted sample standard deviation. The only advantage I guess is that they are easier to use as a...
  9. Replies
    16
    Views
    295

    Re: StDev Macro

    It looks like you are doing weighted averages.

    I am not so sure that you are doing weighted sample standard deviations. For Slice B, my weighted sample standard deviation was 1.20, not 1.09.
    ...
  10. Re: LEFT RIGHT combination help. Extracting MID data with many variables.

    If words Give and by separate it:
    =MID(F15,FIND("Give",F15)+5,FIND(" by",F15)-FIND("Give",F15)-5)
  11. Replies
    3
    Views
    41

    Re: Shell for non .exe Files

    Shell "cmd /c " & "C:\Users\vajo5001\Desktop\OpenWord.rec", vbNormalFocus
  12. Replies
    5
    Views
    248

    Re: Append to pdf VBA

    I have also used pdftk and pdfill in shell() routines.

    This first version of pdftk is limited due to character string length limitations. If just a few to merge, this works ok. One could use...
  13. Re: Removing Outliers with standard deviation

    In a blank sheet, you can run the first 3 subs. They create the data in column A, show non-outliers in column B, and mark column A outliers in red.

    Sub ColA() 'Random data in column A
    Dim a,...
  14. Re: Removing Outliers with standard deviation

    I guess you could run a macro to delete/remove data. If there are less than 30 data points, I normally use sample standard deviation and average. Do that first in two cells and then do a simple...
  15. Re: Runtime error 1004 when trying to create a PowerPoint presentation

    Make sure that the activeworkbook has a sheet named Data.
  16. Replies
    1
    Views
    83

    Re: selecting cells short cut

    Hold shift key down when you click OK in Goto dialog.
  17. Re: Detect if worksheet exist, and if it does ignore the rest of the script

    Sub Main()
    Dim ws
    For Each ws In Worksheets
    MsgBox i1000Check(ws.Name), , ws.Name
    Next ws
    End Sub

    Function i1000Check(s As String) As Boolean
    Dim i As Integer, a, v, tf...
  18. Re: Specifying All Members of an Array

    You can see from the code that you can add a parameter to set sort order. This is "sort" of what the 3rd parameter of =Rank() sort of thing. Even so, it is not perfect. Compare with some tests in...
  19. Re: Specifying All Members of an Array

    Arg2 of the function requires a range.

    Maybe something like this. View the Immediate Window in VBE after a run to see the results.

    Sub ranker()
    Dim c, allVals, Rank, i As Integer
    ...
  20. Replies
    2
    Views
    123

    Re: convert function to a Sub

    lblWotM.caption = WeekOfMonth(CDate(DTPicker1))
  21. Replies
    5
    Views
    105

    Re: email area using Yahoo

    If you are using Outlook and want to use the htmlBody method that Leith explained, see: https://www.rondebruin.nl/win/s1/outlook/bmail2.htm

    Ron de Bruin has CDO examples as well.

    There is also...
  22. Re: Moving vba code from one workbook to another (using vba)

    My guess, without seeing your code, is no for simple copy paste. Doing it in a macro would depend on your code. Likely, a VBAComponents method would be needed.

    A copy of the worksheet to a new or...
  23. Re: What is wrong with my select case statement

    Set is for objects. A string is not an object.

    Dim city As String
    'Set city = ThisWorkbook.Worksheets("Start_here").Range("H9").Value
    Select Case ...
  24. Re: VBA Help - Search Column For String, Do Something, Repeat Search

    Sub Main()
    Dim ws As Worksheet, r As Range, c As Range, d As Long, ID, s As Sheets, a

    ID = 12345
    Set s = Worksheets(Split("Sheet1,Sheet2,Sheet3", ","))
    'Set s = Sheets 'All...
  25. Re: Grab corresponding value from a data range

    You lost me. If something changed, then post another picture that might help.

    You can use a tool from here to make things more clear maybe. ...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4