I was able to see the 2 sheet names as it looped thourgh. It fails at
WS.Protect
And generates a Run Time Error '91' Object Variable or Block Variable not set. This is a different error than I have gotten in the past
I tried to super simplify it to see if one could loop through the Worksheets to apply Protect. This still generates an ERROR 1004. I also tried adding the qualifier WB.ActiveWorkbook.Worksheets to see if that would help but it generated a different ERROR 438. This seems fairly straightforward...
I just ran a test. It has something to do with the ADDED worksheet from the 2nd query making it fail. They wanted additional data on the 2nd worksheet and I was going to add in the various formatting and protections using the first part as a template to do the 2nd worksheet...
The Protect Worksheet was working when I had created the Excel spreadsheet by manually clicking the export button on the ribbon. I needed it more automated so I use the transfer spreadsheet 12xml to get the file in XLSX format. That works for the correct file format and I am still able to...
Microsoft Access 2016
I am trying to create code in MS Access VBA to edit a created Excel Spreadsheet (coming from Access). I want to put a formula in Column N that is basically Column L + Column M from row 2 to until Used Rows. Any help on the Range portion would be appreciated.
So in the...
Using some of your suggestions, the one user with the Chinese characters showing in the LDB file, I experimented opening the LDB in Notepad (Chinese characters) and then Word, which showed the true computer name. So it seems to be a software reading issue as Notepad was not savvy enough...
I am trying to figure out why when a user is in the database their computer ID in the LDB file shows with Chinese characters. As soon as I went into the database as the 2nd user, the Chinese characters disappear and it shows the actual computer name. I don't believe it is causing any known...
I assume "" quotes in a name would mess it up as MS Access needs to use one of these text qualifiers.....but the chances of a double quote in a name are extremely low
Just ran some testing and that appears to have fixed it. Still finds the duplicates while also allowing the P'ing, LLC in.
Thanx for the quick and quality response
I have inherited a piece of code that tests for duplicates and the code is triggering error 3075 when encountering apostrophes and/or commas.
Here is the SQL code, any help and or direction. I tried isolating the error number but I don't think that is the answer, I would prefer the form entry...
My error, oddly some earlier code that was not causing any trouble was not coded correctly and only became a problem with this new piece of code. I fixed the earlier section and it is now working. Thank you all for helping and clearing the code that I presented was helpful. I am not using...
The XLS file is a template from the Gov't and it always has 4 rows of header information, so the actual data starts on Row 5. Its always at least 1 row of actual data starting at row 5. I am not exactly sure where the failure is, I may need to remove the On Error that is more deeply embedded in...
I have been using MS Access VBA to create the Excel object and perform data analysis from within Access. I have been able to do this successfully when looking at a value from a row & column. I am now attempting to compare a data point in a column to another data point in another column, both...
I am trying to work with the Excel object without references to Excel (Late Binding). I am unable to get MS Access to recognize the excel function/method WorkSheetFunction in order to test for duplicates and make a simple background or border color change for the duplicates in a column/range. I...
Thanx
The prior system used an XLS for sending to the Gov't and now their upgraded system changed to a CSV. I asked them (no response) why they would go from a more usable file in XLS that can be more easily formatted to a CSV which if I am not mistaken takes settings from an individual...
Here is something interesting, if I open the CSV file in Notepad the data is unaffected. The CSV file loses the leading "0"s upon opening in Excel. Makes me wonder if whatever gov't program uploads the CSV if it then would in fact have the original correct data. As you can see the leading zeros...
The leading zeros are there right up to the conversion. See the attached XLS file which occurs at the SAVE portion of the codehttps://files.engineering.com/getfile.aspx?folder=0e2e105e-af3c-4077-acce-888b7b0ec7e3&file=New_NMTC_TLR_Note.xls
xlsExcel_sheet.Cells(5, 5).EntireRow.Delete
objexcel_app.activeworkbook.Save
objexcel_app.activeworkbook.SaveAs FileName:="C:\deal\New_NMTC_TLR_Note.csv", FileFormat:=6, CreateBackup:=False
I also have the basic Save included. This is all performed from MS Access as part of the Transfer...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.