excel-vba

Excel Passing Wrong Date Value to VBA Function

岁酱吖の 提交于 2020-06-29 06:37:36
问题 I have a worksheet with Date values. Excel interprets them correctly as Dates. I have a VBA function that accepts a Date parameter. When I call this function from the worksheet, sometimes it works correctly, and sometimes it doesn't. When I set a breakpoint in the function to examine the value passed in to the function from a cell that is incorrect, I discover that the wrong date is passed to the function--it's a day off from what should be passed to the function. The time value is correct.

VBA code works in debug mode, but fails in run mode

蓝咒 提交于 2020-06-29 03:49:13
问题 I am trying to fill one input field in Internet explorer, but the code is only working in debug mode, while I am pressing F8 on each of the actions. When I am running the code automatically, the value fill is not working, the input field remains empty. What could be the issue? Here is the HTML part of the code: <input tabindex="0" class="select__input" type="text"> </div> <div class="sm__amount" name="payment"> <div class="sm__send"> <div class="amount selected" id="amount_get"> <div class=

Choose active page in Visio

怎甘沉沦 提交于 2020-06-29 02:43:05
问题 Edited: I didn't phrase this very will.. I am trying to open Visio (working) and then open a page in the document of my choosing. Thanks Dim FName As String Dim VsApp As Object On Error Resume Next Set VsApp = GetObject(, "Visio.Application") If VsApp Is Nothing Then Set VsApp = CreateObject("Visio.Application") If VsApp Is Nothing Then MsgBox "Can't connect to Visio" Exit Sub End If End If On Error GoTo 0 FName = "C:\myfile.vsd" If Not Intersect(Target, Range("c2")) Is Nothing Then VsApp

VBA Getting data from another Sheet

二次信任 提交于 2020-06-28 10:53:53
问题 Currently i am trying to get data from another sheet, on the current sheet a user types dates they want to get. I am getting a syntax error though, when i try to get the data. This is my code. Private Sub CommandButton1_Click() Dim Fund As String, Start, EndD As Date Fund = Range("B4") Start = Range("B5") EndD = Range("B6") Dim rngS As Range Dim rngE As Range Set rngS = Sheets("Sheet1").Range("A1:A10000").Find(Start, lookat:=xlPart) Set rngE = Sheets("Sheet1").Range("A1:A10000").Find(EndD,

Move to Element Syntax in Seleniumbasic - Excel VBA

大城市里の小女人 提交于 2020-06-28 09:10:06
问题 I have looked across everywhere to find answers but could not get it, so would like your help in guiding me. Selenium Basic (Excel VBA ) is giving me syntax error at the time of compilation. My Objective is to move the mouse to a known element. Here are the codes Dim driver As New WebDriver Dim actions As Selenium.actions driver.Start "chrome", "http://anywebsite.com" driver.get "/" WebElement we = driver.FindElementByClass("MyClassName") actions.MoveToElement (we) It gives me an error at the

Get reference to next visible cell in autofiltered table

☆樱花仙子☆ 提交于 2020-06-28 07:58:07
问题 I have a UserForm that sits on top of my spreadsheet and simply displays information from the row containing the currently selected cell. Buttons on the form allow the user to move up/down the spreadsheet row by row. For example, when the "next record" button is clicked, the code executed is something like: Cells(ActiveCell.Row + 1, ActiveCell.Column).Select LoadValues I would like it to work even if the user filters the data and then loads the form. However, using the above code, it wants to

Make checkboes visible and invisible when a checkbox is ticked and unticked

别等时光非礼了梦想. 提交于 2020-06-28 07:04:41
问题 Heres the Code that I put in the module1 from Tim Williams Sub Tester() Dim isOn As Boolean With ActiveSheet Application.Caller = MuddyBoots isOn = (.CheckBoxes(Application.Caller).Value = xlOn) .CheckBoxes("TabletUser").Visible = isOn .CheckBoxes("WebUser").Visible = isOn End With End Sub I have three checkboxes: MuddyBoots TabletUser WebUser When MuddyBoots is ticked I want TabletUser and WebUser to be visible and when MuddyBoots is unticked I want the two checkboxes TabletUser and WebUser

Delete row with shapes.. TopLeftCell Error

你说的曾经没有我的故事 提交于 2020-06-28 07:04:06
问题 I am currently making an excel template for other people in company to use. I need to delete rows with a single button. I believe I've done everything correctly, but I am keep getting an error. Right below you can see the codes which gives error; Worksheets("Storyboard").Activate Worksheets("Storyboard").Unprotect Password:="**$#B'A1313XQ.;**" satirlar = Baslangic & ":" & Bitis For i = Baslangic To Bitis Dim s As Shape For Each s In Worksheets("Storyboard").Shapes If Not Intersect(s

vba that searches for a string in all the files inside a folder and its subfolders

Deadly 提交于 2020-06-28 05:07:30
问题 I have a huge script to make which I had partly completed (parsing xml file to vba and deleting certain unwanted childs),but i am struck at one point. I have strings (that are obtained from my previous output) in cells A1:A1500 in my worksheet and I have a folder named "model" in the same path where my workbook is placed (the folder has many subfolders and inside subfolders many .c , .h , .xml file types are present). I need a script that will take the string in A1 and search inside all the

How to highlight target holidays in a calendar in VBA and hyperlink task worksheets with business day only

随声附和 提交于 2020-06-28 05:05:27
问题 The target is that I am making a small tool to be made in VBA Excel. The task description is as follows: 1- Make a function in VBA code which would highlight the fixed holidays in the provided Calendar (New Year 01/01 , Labor Day 01/05 , Christmas Day 25/12 , Christmas Holiday 26/12) 2-Make a function in VBA code which would highlight the floating holidays in the provided Calendar (Easter Monday,Good Friday). 3-The worksheets in the workbook should be hyperlinked through the VBA code to a