I'm still using Excel 2000 and I'm trying to use a grid on a user form. From What I've seen online, a flexgrid looks troublesome, so I think the best is to use a spreadsheet control. Whenever I try to add a spreadhseet control I get the error message "the subject is not trusted for the specific...
I am trying to perform the same function on combo boxes on different forms. I have 2 string variables called ControlName & FormName (i.e. FormName = "frmSchedule", ControlName = "tboDate"). I can use the frmSchedule.tboDate.value and it works fine but I'm trying to assign the form and control...
I'm trying to gather information on files in a directory without opening the files. I can get the data on Word, Excel and other files with no problem. I can use DWGProps to get some of the AutoCAD data but it doesn't appear to work beyond AutoCAD 2204. Can I use summaryinfo to get the file data...
In a VBA program when I have the user select an area on the screen, I call the GetUserPoint twice (to get both points) and then call the SelectByPoints sub. Doing this, the user does not have rubber banding as they move the mouse from their first selection point to the second. It seems as if...
I've seen what I want in other programs but I'm not sure what it is. It appears to be a textbox with multiple rows and columns. I want to display 2 columns of numbers with as many rows as I need to dislay. A scollbar on the side allows the user to scroll to the position they want and change any...
I'm trying to add a layout tab to a drawing from a template.
I've already got it to create the drawing from a template
as shown below, but how do I add more layout tabs with the same template?
Here is what I have to create the drawing from the template
ThisDrawing.SetVariable "SDI", 1 'Single...
I'm trying to find the length from one point on a polyline to another point on that polyline. The polyline is only made up of lines and arcs. The polyline.coordinates does not give me any arc information. The Autocad LIST command will give me the arc information but I can't figure out how the...
I'm trying to save some program data so that the next time I run a VBA program the form has some of the controls set as they were the last time it was run in that document. I know I could create a separate worksheet to store it but I'd really like it invisible.
In Word I can use...
From Excel I want to use the GetOpenFilename method to open an Autocad file. Below is what I have but it certainly doesn't work. any ideas?
Dim NewFile As String
Dim ACAD As Object
Dim MyPath As String
On Error Resume Next
Set ACAD = GetObject(, "ACAD.Application")
If Err <> 0 Then...
I have an automated Word document that looks to an Excel file where I am saving lines of text. I use strVariable = ExcelSheet.Cells(i, 2) to get the text in the file but it doesn't see the carriage returns. I've tried vbCr and vbLf and Chr$(10) but nothing seems to work. I have
"this bit is...
In AutoCAD, if you are going to select a group of objects to move/erase, an expanding selection window is displayed as you move the cursor from the first picked point to the second point to allow the user to visualize the entities that fall within the selected area. How do I get this expanding...
I have a small VBA progam in an Excel spreadsheet that helps the user set up the worksheets. Once they save the spreadsheet to a new file there is no use for the program but it still gives the Disable/Enable Macros warning. Is there a way to save the Excel workbook without the VBA program?
To define a message box I usally do the following:
Style = vbYesNo + vbCritical + vbDefaultButton2
The latest program I'm working on is going to be used by Spanish speaking customers and I need for the buttons to be labeled as Si/No rather than Yes/No. Is there a way to make the msgbox function...
I have some template worksheets in a workbook that I want to copy. The templates names start with "zz" to differentiate them from the other worksheets. I want to copy worksheet named "zzThisworksheet" to "Thisworksheet" and leave the "zzThisworksheet" unchanged. The code below does make the copy...
In a VBA program, the last item I drew appears on top of an item I drew before that. Is there a way (other than changing the order that I draw them) of sending a LWPolyline to the back?
Can I change certain coordinates of a LWPolyline using VBA? I'm trying to raise certain Y coordinates by 4". I've written the below code which seems like it should work but it doesn't do anything.
For i = LBound(objLWPoly.Coordinates) To UBound(objLWPoly.Coordinates) - 1 Step 2...
When I loaded a VBA program in AutoCAD and hit alt-F11 to view the VBAIDE, the userform was shown and I could just hit the run button to run the program. I have since added a class module to the program. Since adding the class module, when I load the program and enter the VBAIDE, the only thing...
I can easily add a layout to an AutoCAD drawing with
ThisDrawing.Layouts.Add "Sheet1"
But what I really need to do is add a Layout From Template. Does anybody have any idea how to do that?
I have an embedded Excel spreadsheet on each layout tab of a drawing. I need to select, open and read the spreadsheet. Is there any way that I can select these OLE objects with VBA?
On a VBA user form I have some list boxes and combo boxes. As the user enters data and then hits a tab or carriage return to go to the next box I would like to sense the tab or carriage return so I can use that data immediately. Is there an event that I can use or a way to sense the carriage return?