I know I can save a word document, convert it to base-64 byte string, and embed it in an xml file for webservice transfer. Can I skip the saving the document into an actual file and "deserialize" the document in memory? Also, can I do the same in reverse?? Load a new document from a byte string?
I wonder what Microsoft is thinking when they expose all those events for Excel but only Open, Close, and New for Word. Is there any way to catch when a user delete or move a shape/picture in a document?? My macro insert special pictures into the document that I need to retrieve later on. For...
Hi. I am trying to insert a rectangle shape right after the current cursor. I know you can do ActiveDocument.Shapes.AddShape() but how do I find the current position of the cursor? I need to specify the "Left" and "Top" of the rectangle which should be where the cursor currently is. Also how...
Many visual basic control has a 'Tag' property to store extra info about that control. Does a similar property exist for Excel Workbooks? I want to assign some identification info to each workbook that categories workbooks; this could be as simple as a Company's name or a Department name. Any...
Actually, I don't want to be running any code while Excel is in Edit Mode. I am trying to prevent that from happening. That's why I want to know when Excel is in Edit Mode so I make sure none of my code will run.
Is there any way to detect when Excel enters cell editing mode? The worksheet Change event fires AFTER a cell has been changed. There are no events that fires as soon as excel enters cell editing mode. So far I can catch the doubleclick event and know that cell editng will take place...
Whenever a cell is active in edit mode (when user enter a cell with the blinking '|' ), running any macro that contain excel application method calls causes a runtime error "1004: method 'SomeMethod' of object 'excel application' failed" . However, when I go to debug mode, and just continue...
When a range is selected for copying, there's a dotted outline around the range. After the copy-paste operation is done, the range is still selected. I know that in Excel, you can manually deselect any range by double clicking on a cell. However what's the right way to do it via code? I have...
Hi,
I solved the problem. But to clarify, my main application is just a visual basic form that allows users to manipulate excel files in an embedded instance of excel along with using application-specific functions. Excel is automated/embedded using createObject and binding the excel window...
Hi. I have created an application with an embedded excel. My problem is when a user clicks on something on my application that is not part of excel, excel looses focus (which is expected). However, when I click back on Excel, Excel still doesn't regain focus. I have to double click in order...
What are the ways to copy an entire workbook to a new workbook? I am thinking of copying all the worksheets but that's tedious. Is there a simpler way?
I have a form that hides/unhides rows/cols in a worksheet. I keep getting the error "Unable to set Hidden property of Range class" when I try to set usedRange.Rows(num).entireRow.hidden to something. This fails only for SOME range....
Hi,
I have a macro to add a new worksheet template to a workbook. However, if the workbook is protected, an error occurs. How can I check if an opened workbook is protected? I have tried workbook.haspassword and workbook.password but they don't correspond to the protection of the workbook...
How do I add a new worksheet based on a template to an existing workbook? I can create a new workbook from a template but when I insert a new worksheet, it's always the blank normal excel one.
Is it possible to catch when a user opens a new workbook? Instead of the normal Excel Open File dialog coming up, I want to launch my own. The Workbook_Open() event is AFTER a workbook is selected and opened. Thanks!
Hi,
This is a pretty simple problem that I can't figure out for the past 3 hours. How do I find the name of a range given the range's address? The big problem is that range.name does not give the name I gave the range.
Dim lRange as Excel.Range
myWorkbook.Name.Add "Range1" rangeAddress...
Hi,
I need create a form that can display an excelworksheet and allow users to hide / unhide ranges using MY controls. I will be disabling all of Excel's toolbars and menus so all the user can see is the worksheet. Should I use OLE control or embedded an excel application? What are the pro...
I embedded Excel into a visual basic application and I want to know how to set focus back to Excel after Excel loose focus. My problem is that I disabled all the Excel toolbars and menus so only the worksheet shows up. I also protected the worksheet from editing. I have some controls on my...
I am just adding an functionality to a complex application that requires Excel. My functionality only need to display excel worksheets and allow the user to hide or unhide cols/rows using my controls. It's probably easier to just convert excel worksheet data to a grid or table or OWC as you...
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.