Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Anthony047

    count shapes

    This is my latest development on the subject. It prints by horizontal priority. It is the sum up of different works, the code is far from optimized. Sub GetLastShape_3() 'get the rightmost shape, then print up to that page ' Dim oShp As Shape Dim ShLast As Single, XBShape As Single, XTShape As...
  2. Anthony047

    count shapes

    Hi macropod, it is not clear to how Peter's worksheet is organized and why he is relying on this method to determine the pages to be printed. Your message forced me to re-read Peter's messages, and realize he was willing to check the horizontal position of a shape. At this point the approach...
  3. Anthony047

    count shapes

    I think you could use the following macro, that first identify the "last" shape, then determine on which page that shape lays on. Sub GetLastShape_2() Dim oShp As Shape Dim ShLast As Single Dim ShName As String ' For Each oShp In ActiveSheet.Shapes If oShp.BottomRightCell.Row > ShLast Then...
  4. Anthony047

    Excel combobox Function

    ..and you can even sum several cells, for example this will sum 5 adjacents cells from offset(0,0) of the selected month. =Sum(Offset(Indirect(B5),0,0,1,5)) Bye. Anthony047 (GMT+1)
  5. Anthony047

    Excel combobox Function

    I think you need neither the combobox nor the Udf to perform what you explain. -you create the list of months and assign to this range a name, ex MList -assign the names of the monthly data ranges same as the names in Mlist (ex Mlist=Jan, Feb, Mar etc; one range named Jan, one named Feb, etc)...
  6. Anthony047

    count shapes

    At this point we should be glad to hear from Peter that his problem is now fixed... Bye. Anthony047 (GMT+1)
  7. Anthony047

    Offset in Custom Function Problem

    The top inconsistency is that Offset is NOT in the list of WorksheetFunctions available from Vba (check the help on line). Try this: Public Function roff(x As Integer, y As Integer) roff = Range("January").Range("A1").Offset(x, y).Value End Function Bye. Anthony047 (GMT+1)
  8. Anthony047

    count shapes

    I don't want to compete with macropod, but this might be a simplified version of the macro: Sub GetLastShape_2() Dim oShp As Shape Dim ShLast As Single Dim ShName As String ' For Each oShp In ActiveSheet.Shapes If oShp.BottomRightCell.Row > ShLast Then ShLast = oShp.BottomRightCell.Row...
  9. Anthony047

    Word: Draw a line via vba

    For a moment I was doubtfull about "negative coordinates" (eg Horizontal- 92.5) then I realized it was part of the label! :-))) It works perfectly, I think we may consider resolved the case(s). Thanks again, a very useful forum! Anthony047 (GMT+1)
  10. Anthony047

    deleting formulas from a varible no of rows spreadsheet

    Hi basbrian, I suggest the following approach. -On Sheet2, A2 and B2, set the formulas to copy the data from the corresponding cell of Sheet1; probably they will be =Sheet1!A2 and =Sheet1!B2 (if you now copy col A and B) -on C2 set your formula -assign to the range A2:C2 the name "BFormula" (via...
  11. Anthony047

    Word: Draw a line via vba

    You give me too much, but every byte or kbyte is welcome! Btw, and no longer related to the problem that your code brilliantly resolved, how can I get the X-Y coordinates of a selection, given that "GetPoint" returns useless information? (as per my first post, ActiveWindow.GetPoint pLeft...
  12. Anthony047

    Word: Draw a line via vba

    The right separator for my word version is ";" as both "," and "." results in "Error". Macropod's macro is very useful, I shall create a modified version to be used on existing documents to reformat the existing text alternatives (like "I agree / I don't agree"); I think I shall set markers...
  13. Anthony047

    Word: Draw a line via vba

    YES, it DID help, even though I had to add a "space" before the ";" (otherwise the selected text doesn't show as the denominator of the fraction). I assume using the semicolumn is related to the Italian version of Word. Thanks to both of you.
  14. Anthony047

    Word: Draw a line via vba

    Two side questions: -when I enter manually a fraction, "space" is not allowed in the terms, so I can type "MyWord" but not "My Word"! no any bypass? -how can I edit the fraction? I can only select it as a whole. Thank you.
  15. Anthony047

    Word: Draw a line via vba

    Thank you macropod for your message, it showed me a useful path. However at the completion of the macro the result is the word "Error" in my document, at the position of the Equation; no any ru-time error. But I was able to enter manually a fraction (Menu /Insert /Field, equation, then used the...
  16. Anthony047

    Word: Draw a line via vba

    Hello to everybody, I need to draw a "line" over some text of a Word document; unfortunately using the "strike" effect of the text font is not feasible due to the presence of "subscript" characters. After selecting the text, I tryed reading the coordinates of the text with...

Part and Inventory Search

Back
Top