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 Chris Miller 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: *

  • Users: combo
  • Order by date
  1. combo

    Crazy question: Can anyone help me create a routine to roll 2 dice 1000x and sum them?

    Problem solved, so it's just an idea to complete the task with queries only: 1. create a table [T10] with field [V], values 1 to 10, 2. query: SELECT 100*[T10_2].[V]+10*[T10_1].[V]+[T10].[V]+1 AS ID, Int(Rnd(2*[ID]-1+Timer())*6)+1 AS Dice1, Int(Rnd(2*[ID]+Timer())*6)+1 AS Dice2 FROM T10, T10 AS...
  2. combo

    Having trouble with Excel Lookup

    Why array function in S3? Try regular one.
  3. combo

    Excel macro to send e-mail to multiple agents with a different body for each

    To make referencing easier i would either pick data from range to variant array (vData=rngData) or reference range cells by indexes: Dim rngData As Range Dim iRngRows As Integer, i As Integer Dim sHTMLBody As String Set rngData = Worksheets(1).Range("A1").CurrentRegion ' if no other data next to...
  4. combo

    Excel Pivot Table - Combine Values into a single row

    @remeng, please describe the required process of transformation of data you have. As far as I understood (?) from all the above you have in Excel: 1) hardware packs table: 2) components table: There are a lot of questions, how the tables are related, some fields have the same name - which...
  5. combo

    Script seeing input variable value as blank but sees hard-coded value

    In: "(sAMAccountName=UserLogonName));" & _ you have UserLogonName in string, I guess you need a variable here: "(sAMAccountName=" & UserLogonName & "));" & _
  6. combo

    Copying spreadsheet for posting

    As Andy wrote, you can attach whole excel file, in your case without some data. In case of one or more worksheets: (1) select required sheets, (2) copy to new workbook, (3) break links, (4) save, (5) attach saved file. Delete remaining confidential data if still necessary, convert formulas to...
  7. combo

    Run-time error '429': ActiveX component can't create object From Excel to Word

    I don't know the process you plan to automate, but some time ago I made an Excel application to deal with Word mail merge - export documents to 'pdf' format. Mail merge, for security reasons, is blocked in case of full automation - existing data source is not available (AFAIR it is still...
  8. combo

    Excel - Toggle Button Code

    Depending on the purpose of workbook and necessity of other code - if it is the only reason to introduce VBA, I would use data validation instead, with list as entry type and range consisting of two cells, with 'x' in one of them (hard-coded blank in DV list does not work). With entry and error...
  9. combo

    run-tune error 3704 operation is not allowed when the object is codes: I don't think so.

    Have you tried to play with NextRecordset to get proper data (see https://paulkroon.com/2009/09/20/excel-vba-macro-to-execute-a-stored-procedure/ and https://learn.microsoft.com/en-us/sql/ado/reference/ado-api/nextrecordset-method-ado?view=sql-server-ver16 )?
  10. combo

    Outlook Template replace text

    I will test this tomorrow, but basing on https://learn.microsoft.com/en-us/office/vba/word/Concepts/Customizing-Word/finding-and-replacing-text-or-formatting I would try: ... Set oRng = wdDoc.Content With oRng.Find .Text = "@PrimaryPhaseNumber@" .Replacement.Text =...
  11. combo

    Outlook Template replace text

    Without testing, can you try to use Word as editor to edit the mail body, as gmayor suggests in http://www.vbaexpress.com/forum/archive/index.php/t-64933.html ?
  12. combo

    What has happened here to Tek-Tips??

    It seems that this feature gone. At the very bottom-right of each page you can find small 'Help' with available BB-codes and emoticons (seem to be the same as in 'good old days'):
  13. combo

    What has happened here to Tek-Tips??

    Yes, it is easy to get lost after this big change and there is a lot to learn. My first impressions after a couple of days of browsing the site: there is a lot to customize. I changed style to NOVA, for me it is better than the classic one. I reviewed and adjusted all profile settings, esp. it...
  14. combo

    How to resolve define worksheets array

    There are some issues to solve. First, declare worksheets, use As Sheets instead: Dim wsSheet As Sheets Second, work with the array of worksheet. It is possible only to apply logic from single sheet and apply to the rest, and it seems that activate/select is required: wsSheets.Select...
  15. combo

    Grid From

    With indents you can easily find closing End If missing: For Each ctl In Me.Controls If TypeOf ctl Is CommandButton Then If ctl.Name Like "cmdOrder*" Then ctl.Visible = True ctl.Caption = DLookup("[cmdCaption]", "tblCmds", "[cmdID]='" & ctl.Name & "'")...
  16. combo

    excel automation printing to pdf error

    Excel export to pdf is in fact printing to pdf, with current page setups for each sheet, plus additional settings. So you need to either set page setups for each sheet or use preformatted workbook or template, open it (or create new workbook from template) and fill it and next export. A lot of...
  17. combo

    Power Pivot Filter out Rows where data is not in all columns

    It is hard to guess the data model filters and calculations behind your power pivot table. If the input tables are Excel ones, you can attach sample workbook for analysis - leave few rows in each table with false data, but still exposing the problem you have in pivot table. Remove some private...
  18. combo

    Power Pivot Filter out Rows where data is not in all columns

    The PT layout depend on its format, not the data source. The difference is, if pivot table is based on data model, multiple tables, measures and relations defined in the model are available in single pivot table. Measures or calculated fields have to be in 'values' area in PT (MS info concerning...
  19. combo

    Power Pivot Filter out Rows where data is not in all columns

    In my case default pivot table layout has one filter button. The list to filter (for row fields) depend on the field with data in active cell. combo
  20. combo

    How to add a head to the search results in Excel 2016 using VBA

    With a lot of guessing, I assume that you ask how to fill listbox headers headers if ColumnHeads property is set to true. If so, it works only when RowSource property of ListBox is a valid address of a range, where the data is stored. The headers are from the row above. An alternative is to...

Part and Inventory Search

Back
Top