Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. ninjamyst

    Load/Save Word Document from/to memory

    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?
  2. ninjamyst

    VBA Word Events (Catch when user delete/move a shape)

    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...
  3. ninjamyst

    Insert Shape at current cursor position in Word

    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...
  4. ninjamyst

    Tag Information in Workbooks?

    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...
  5. ninjamyst

    Active cell causes runtime error when running macro

    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.
  6. ninjamyst

    Active cell causes runtime error when running macro

    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...
  7. ninjamyst

    Active cell causes runtime error when running macro

    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...
  8. ninjamyst

    Deselect range selected by copy function

    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...
  9. ninjamyst

    Set focus to Excel App in automation

    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...
  10. ninjamyst

    Set focus to Excel App in automation

    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...
  11. ninjamyst

    How to copy entire workbook?

    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?
  12. ninjamyst

    "Unable to set Hidden property of Range class" error

    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....
  13. ninjamyst

    How to check if workbook protected?

    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...
  14. ninjamyst

    Add new worksheet from template file

    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.
  15. ninjamyst

    Catch Excel Open Workbook Event

    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!
  16. ninjamyst

    Find Range Name Base on Range Address

    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...
  17. ninjamyst

    OLE control or Excel Automation??

    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...
  18. ninjamyst

    Set focus to embedded excel

    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...
  19. ninjamyst

    Disable all functions and shortcut keys for Excel

    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...

Part and Inventory Search

Back
Top