wblog | Personal blog project developed based on gin+gorm | Web Framework library
kandi X-RAY | wblog Summary
kandi X-RAY | wblog Summary
Personal blog project developed based on gin+gorm
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of wblog
wblog Key Features
wblog Examples and Code Snippets
Community Discussions
Trending Discussions on wblog
QUESTION
I am working on making a universal production time sheet(wbTime
) for each dept that will work across all shifts and lines. I have where all the necessary information is required to be entered, all the data getting copied into a table in another workbook(wbLog
) and saved to be able to do analysis on the production data.
However, when it gets to trying to save the actual time sheet in the proper folder according to shift and machine line I start running into problems. I have it pulling part of the path from certain cells and the filename form the date the enter. It is getting to the last line and throwing a run-time error 1004 "Method 'SaveAs' of object_Worbook'failed".
I have only been playing with vba for 2 months so it is probably something small that I just do not see...
...ANSWER
Answered 2019-Feb-05 at 14:49a) Don't use Range.Text
, use Range.Value2
.
Text
will give you exactly what is written in the cell, and if the cell diplays ###
because your cell is to narrow to display a number, it will give you ###
.
b) Put a statement Debug.print path
before the SaveAs
and check in the immediate window (Ctrl+G) if the path is exactly what you expect.
c) Be sure that when you issue the SaveAs
-command, the same file is not already open in Excel - this happens often when you test your code repeatedly (it may still open from the last test). SaveAs saves a copy of the file and keeps it open!
d) Use FileFormat:=xlOpenXMLWorkbook
when you name the file with extension xlsx
. xlNormal
will save the file with the old Excel file format and expects xls
as extension.
e) Try to save the file with exactly the name from the Excel SaveAs dialog to see if the filename is okay and you have permission to save a file.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install wblog
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page