vba

Excel barcode inventory

梦想的初衷 提交于 2021-02-19 09:42:55
问题 I'm trying to make an Excel workbook to track a stock balance. Right now my workbook is set up with an Inventory, Deposit and Withdrawal sheets. Inventory sheet contains codes and quantity for each item in stock. I want to enter the item code in A1 cell on either the Deposit or Withdrawal sheet, then a program should take the number and see if it matches anything in the Inventory sheet, if it does then it should either add 1 to quantity of that item, or remove, depends on the Deposit or

Excel barcode inventory

旧时模样 提交于 2021-02-19 09:42:42
问题 I'm trying to make an Excel workbook to track a stock balance. Right now my workbook is set up with an Inventory, Deposit and Withdrawal sheets. Inventory sheet contains codes and quantity for each item in stock. I want to enter the item code in A1 cell on either the Deposit or Withdrawal sheet, then a program should take the number and see if it matches anything in the Inventory sheet, if it does then it should either add 1 to quantity of that item, or remove, depends on the Deposit or

Why is email body, using custom template, delivered in plain text?

假如想象 提交于 2021-02-19 09:29:48
问题 I have a list of users to send multiple attachments with custom email body (.oft template). User's details are in an Excel file. I had prepared (.oft template) in standard format with some images and style fonts. When I use msg.Send emails are delivered with an attachment but the email body is displayed in plain text. But, msg.Display displays the email with an associated attachment and expected email body (.oft template). Option Explicit Sub Send_Mails() Dim sh As Worksheet Set sh =

Why is email body, using custom template, delivered in plain text?

僤鯓⒐⒋嵵緔 提交于 2021-02-19 09:25:55
问题 I have a list of users to send multiple attachments with custom email body (.oft template). User's details are in an Excel file. I had prepared (.oft template) in standard format with some images and style fonts. When I use msg.Send emails are delivered with an attachment but the email body is displayed in plain text. But, msg.Display displays the email with an associated attachment and expected email body (.oft template). Option Explicit Sub Send_Mails() Dim sh As Worksheet Set sh =

How to execute Batch File while passing parameters from Excel

核能气质少年 提交于 2021-02-19 09:00:18
问题 I am trying run a batch file placed at a particular path. The file requires user inputs for which I want the parameters to be passed from Excel cells. This execution of the batch file within Excel should happen by usage of click command button. I am new to VBA. I tried the following code, but on clicking the button nothing is happening. Private Sub CommandButton2_Click() sid = Excel.Worksheets("Sheet1").Range("I8").Value user = Excel.Worksheets("Sheet1").Range("I9").Value Password = Excel

Translating Excel VBA script to Python [closed]

陌路散爱 提交于 2021-02-19 08:46:07
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago . Improve this question I have the following VBA script: Sub excelgraphme() With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;C:\DRIVE D\graphme\result.txt", Destination:=Range("$A$1")) .TextFilePlatform = 866 .TextFileStartRow = 1 .TextFileParseType = xlDelimited

Save outlook email to my internal drive as .msg file

落爺英雄遲暮 提交于 2021-02-19 08:37:05
问题 I'm trying to save Outlook emails into my H:Drive. I want it as a run a script rule but I can't get it to work. There are no attachments involved and all I need it is to save it as a .msg file. Please lmk if you find a different way to tackle this problem. Thanks Sub ExtractEmailToFolder2(itm As Outlook.MailItem) Dim OlApp As Outlook.Application Set OlApp = New Outlook.Application Dim Mailobject As Object Dim Email As String Dim NS As NameSpace Dim Folder As MAPIFolder Set OlApp =

Accessing webservice with credentials using vba

放肆的年华 提交于 2021-02-19 08:33:26
问题 I'm working on a longer script for Access and at one point it is necessary to check a webservice for the latest version of a file (the filename). This webservice is only accessible via a browser with an URL like https://webservice.example.com:1234/Server/test.jsp?parameter=value then it is necessary to authenticate with the standard browser username password pop up. Of course I could skip this pop up if I'd use something like https://user:password@webservice.example.com:1234/Server/test.jsp

Extracting bits from a float in vba

我是研究僧i 提交于 2021-02-19 08:11:51
问题 How can I extract the bits from a Single variable in vba? For example, I want to extract bits 23 to 30 and place them into the lowest 8 bits of an integer. 回答1: For transferring the bit settings of the short variable to an int , the fastest solution is a 'quick and dirty' CopyMemory approach, as seen here. Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Bytes As Long) Public Sub DoubleToIEEE32(ByVal dValue As Double, ByRef nI1 As

Excel VBA control IE

ⅰ亾dé卋堺 提交于 2021-02-19 07:54:05
问题 I have found the following code on the WiseOwl website. I am trying to find a working example (to learn from) on how to enter a seach string into Googles search field. I keep getting a debug error 462 andf cant get past this. The line causing the problem is: ieApp.Document.getElementById("gbqfqw").Value = "Excel VBA" My total code is: Sub FillInBBCSearchForm() Dim ieApp As New SHDocVw.InternetExplorer ieApp.Visible = True 'go to the website of interest ieApp.Navigate "http://www.google.co.uk"