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 sizbut 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

    Problem with Excel pasting into filtered cells

    It's just an Excel feature, hidden rows have still data and can be referenced in other cells. It seems that Excel copies visible cells. There are possibilities (copy & paste in filtered range): single cell copied, single cell selected to paste: trivial, single cell copied, range selected...
  2. combo

    SQL data types in CREATE/ALTER TABLE queries

    Thanks, it seems that there is a total mess here. I tested some types, my observations: Access will not save query with not recognized field type, a direct answer to my post: simple BIGINT and DATETIME2 work! TINYINT is not recognized, BYTE works, TEXT and LONGTEXT create text and long text...
  3. combo

    SQL data types in CREATE/ALTER TABLE queries

    I found a list a list of Access SQL data types from MS here. However, this article refers to Access 2013. In the meantime Access introduced large number and extended datetime fields handling. Is it possible to generate new types fields with access query, if so - what type names should be used?
  4. combo

    Calculate amt due

    With a layout as in the workbook, IMHO the only way is to manually arrange output. If it is possible to rearrange data, I would use: column example/remarks CustID C004200 Name Cusomer #4 SettlementID #1, #2, ... Type Settlement, collection Amount use negative in one of types (for...
  5. combo

    Open Word as ReadOnly

    Actually, Word may repaginate document for different printer, update fields or styles. NB, read-only document can be changed, next saved, but only with different name. Another option to close changed document without saving: wdDoc.Saved = True wdDoc.Close
  6. combo

    Help with a Query.

    If your data is a copy from pivot table report and both Code and Serial are in row area, you can format set pivot table field (in this case code) to repeat labels - no need to fill field with empty entries.
  7. combo

    Hyperlinks in Word cut at #

    The rest is in subaddress. Sub test() Dim wdDoc As Word.Document Dim oLink As Word.Hyperlink Set wdDoc = ThisDocument Set oLink = wdDoc.Hyperlinks(1) 1 Debug.Print oLink.Address & "#" & oLink.SubAddress 2 Debug.Print oLink.TextToDisplay 3 Debug.Print oLink.Name End Sub In (1): I guessed the...
  8. combo

    Excel formula to count occurrences of a value in a different sheet

    A little shorter formula with SUMPRODUCT: =SUMPRODUCT((YEAR('Sheet 2'!A6:A999)=2024)*1)
  9. combo

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

    ...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...
  10. combo

    Having trouble with Excel Lookup

    Why array function in S3? Try regular one.
  11. 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...
  12. 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...
  13. 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 & "));" & _
  14. 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...
  15. 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...
  16. 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...
  17. 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 )?
  18. 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 =...
  19. 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 ?
  20. 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'):

Part and Inventory Search

Back
Top