vba
73 TopicsUser Defined Function not showing with up "="
I have a few UDFs' that i have written for practice since i'm just getting into the programming portion of VBA. I have 3 Projects in my vba window. 1 for macros, 1 for my UDF, and the last one is whatever workbook i have opened. My question is how can i get my functions to show up when typing "=". I have searched google and the only answer that i came up with is i have to attach the module that has the function into the current workbook. My functions do work and show up when using "=" but it is a little annoying to have to attach them to every workbook i create since im dealing with new and multiple workbooks everyday. I also know that the "insert function" is under the formula tab and that works as well but still an annoyance. Just seems like there is an easier better way. Yes the functions are public, No the module names are not the same as the function name.78KViews0likes8CommentsRecovering a VBA protect password
I wrote a database in 2009/2010 in 2007. I migrated it to 2010, changed it to an accdb and password protected the VBA. In 2017, I left the company, handed over all of my passwords, and left my code in another's hands. In Sept 2021, they asked me to please come back, I did, and the password to the DB I am trying to recover was lost. I have tried using HxD, which doesn't work with accdb. How can I recover the password?9.9KViews1like5CommentsSharepoint list update is not working sometimes
Hello all, I have a sharepint list, and updating the list using access vba. I have a problem sometime the update works and sometimes it doesnot works, i have been trying to solve this problem using different commands like CurrentDb.TableDefs("shp_table").RefreshLink but unfortunately its not working. I am using a loop with maybe 5 recordsets, sometime 4 gets updated, sometimes 5 my update command is right. Do you have some possible solution for this? many thanks in Advance BR ArslanSolved8.4KViews0likes31Commentsvba sending email w/ attachment
long bit of code and im sure you all don't need all of it but its here for reference. The email portion works fine when under strBody i have text or a range with "". the problem im having is with getting it to upload a file path for an attachment. do i have to change all my code or is there just a slight typo. the WBname portion of it is a public variable defined in a different module and works like it should within its own module (the following module). Option Explicit Public Sub BlkLst_Save() Public WBname As String WBname = "BlackList" & ActiveSheet.Name & Format(Now(), "MMM dd, yyyy") Workbooks.Add ActiveWorkbook.SaveAs Filename:=WBname Workbooks("blacklist system").Activate Range("A1:F150").Select Selection.Copy Workbooks(WBname).Activate Range("A1").Select ActiveSheet.Paste End Sub so the above works fine. Below is the email portion of this and runs into an error when trying to pull from that save path as previously stated. I have bolded and italicized the portion that errors out. (**** indicate deleted information for security) Public Sub M_Emailer() 'sends email to Marik for blacklisted devices Dim CDO_Mail As Object Dim CDO_Config As Object Dim SMTP_Config As Variant Dim strSubject As String Dim strFrom As String Dim strTo As String Dim strCc As String Dim strBcc As String Dim strBody As String strSubject = "Blacklist From CDR" strFrom = "*******" strTo = "********" strCc = "" strBcc = "" strBody = C:\Users\tabor\Documents\&WBname&.xlsx Set CDO_Mail = CreateObject("CDO.Message") On Error GoTo Error_Handling Set CDO_Config = CreateObject("CDO.Configuration") CDO_Config.Load -1 Set SMTP_Config = CDO_Config.Fields With SMTP_Config .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com" .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "*******" .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "*******" .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1 .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 .Update End With With CDO_Mail Set .Configuration = CDO_Config End With CDO_Mail.Subject = strSubject CDO_Mail.From = strFrom CDO_Mail.To = strTo CDO_Mail.TextBody = strBody CDO_Mail.CC = strCc CDO_Mail.BCC = strBcc CDO_Mail.Send Error_Handling: If Err.Description <> "" Then MsgBox Err.Description End SubSolved7.6KViews0likes7CommentsNeeds Help on the VBA for an Attendance Sheet
Hi! I need to create a new routine so that it will highlight in the "Summary" sheet in i) red for courses that the staff has not attended after the deadline has passed, and ii) yellow for courses that the staff has attended but only after the deadline has passed. This has to be based on the "Attendance List" sheet Attached is the excel file. Any help is much appreciated!! Btw, I know how to do it using conditional formatting but I need to create a VBA for other purposes as well. https://docs.google.com/spreadsheets/d/1R-BrDQG_cJ0I0BzL_oIPVk8IGFFUbn77AoGFFmV1mBs/edit?usp=sharing7.1KViews0likes10CommentsAccess Releases 6 Issue Fixes in Version 2209 (Released September 26)
Our newest round of Access bug fixes was released on September 26. In this blog post, we are highlighting some of the fixed issues that our Access engineers released in the current monthly channel build 2209.6.9KViews4likes1CommentVBA code to bring the active document in front
I have a subroutine that produces and edits six different documents. My current problem is that the documents all stay in the background. But, I want them to be in front of all other windows using only VBA and without APIs. I've looked for code to do that and they either use APIs or create a new document. I tried this code: Sub Generate_Motion() Call Initiations Documents.Add Template:=pathInputDoc & "\Template.dotx" Dim wdApp As word.Application Dim word As word.Document Set wdApp = GetObject(ActiveDocument, "Word.Application") wdApp.Visible = True With ActiveDocument ... End Sub but it gives me an error. Is there way to bring an already-open document in front using only VBA code?6.3KViews0likes3Comments