none
VB access problem, what utilities are needed for vb to work.. RRS feed

  • Question

  • hi,  i have been running into some problems with my workbook,  not sure if there is some utility that needs to be installed - reinstalled..

    one symptom is that i cannot get the function:  RESIZE to work.

    is there a way to troubleshoot this.  i have tried OFFSET, (works),  but RESIZE does not.  it did at one time.  not sure if RESIZE has anything to with what i am saying, but can use any ideas on troubleshooting my vb setup.  thanks.

    (signing off, back later)
    • Edited by Davexx Monday, April 2, 2018 5:35 PM
    Monday, April 2, 2018 5:34 PM

Answers

  • I assume you refer to the Range.Resize Property in VBA?

    Check that you first have a valid Range to resize. You can use

    Debug.print MyRange.Address

    in the VBA Editor window see if Tools > References shows any references as "Missing". If so remove or replace the missing ones.

    Finally try to repair or reinstall Office...

    If still an error please send the exact details of the error message you get...


    Brian, ProcessIT- Hawke`s Bay, New Zealand

    • Marked as answer by Davexx Tuesday, April 3, 2018 10:04 AM
    Tuesday, April 3, 2018 2:18 AM
  • Hi Davexx,

    I try to refer the description and I have some questions about it to understand the issue in better way.

    (1) Are you working with VBA or VB.NET?

    (2) If you are using VB.NET then which type of project you are developing?

    (3) What do you mean by "Resize" not working? Does it gave you any error? If yes, Let us know about that.

    (4) I assume that you are working with VB.NET and I try to make a test with "Resize" on my side using VSTO VB Workbook project.

    Code:

     Private Sub ThisWorkbook_Startup() Handles Me.Startup
            Dim sheet As Excel.Worksheet = Me.ActiveSheet
            sheet.Range("A1").Resize(10, 10).Select()
        End Sub

    Output:

    Reference:

    Range.Resize property

    Range.Resize Property (Excel)

    You can see that on my side it is working correctly. To narrow down the issue, You can also try to post your sample code here.

    Let me know, If i misunderstand something in your above description, I will try to correct myself and try to provide you further suggestions to solve the issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Davexx Tuesday, April 3, 2018 10:04 AM
    Tuesday, April 3, 2018 3:03 AM
    Moderator

All replies

  • I assume you refer to the Range.Resize Property in VBA?

    Check that you first have a valid Range to resize. You can use

    Debug.print MyRange.Address

    in the VBA Editor window see if Tools > References shows any references as "Missing". If so remove or replace the missing ones.

    Finally try to repair or reinstall Office...

    If still an error please send the exact details of the error message you get...


    Brian, ProcessIT- Hawke`s Bay, New Zealand

    • Marked as answer by Davexx Tuesday, April 3, 2018 10:04 AM
    Tuesday, April 3, 2018 2:18 AM
  • Hi Davexx,

    I try to refer the description and I have some questions about it to understand the issue in better way.

    (1) Are you working with VBA or VB.NET?

    (2) If you are using VB.NET then which type of project you are developing?

    (3) What do you mean by "Resize" not working? Does it gave you any error? If yes, Let us know about that.

    (4) I assume that you are working with VB.NET and I try to make a test with "Resize" on my side using VSTO VB Workbook project.

    Code:

     Private Sub ThisWorkbook_Startup() Handles Me.Startup
            Dim sheet As Excel.Worksheet = Me.ActiveSheet
            sheet.Range("A1").Resize(10, 10).Select()
        End Sub

    Output:

    Reference:

    Range.Resize property

    Range.Resize Property (Excel)

    You can see that on my side it is working correctly. To narrow down the issue, You can also try to post your sample code here.

    Let me know, If i misunderstand something in your above description, I will try to correct myself and try to provide you further suggestions to solve the issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Davexx Tuesday, April 3, 2018 10:04 AM
    Tuesday, April 3, 2018 3:03 AM
    Moderator
  • hi,  thanks both!  i will check these out.  think having multiple issues on my pc and not all may be related.  for resize i may not have employed a vb properly??  (minor but other post got some answers, i am told i used a zero incorrectly;  other:) trying to fend of some other real-time stuff, rebooting my pc on me, .ru surrep bat files, and trying to get work done..  just trying to get on top of what is causing what).

    i will get back when can if i find any other problem related to this.  i think problem with up too many hours, i did not consider difference between OFFSET & RESIZE (for inclusive on values, or not inclusive;  i would have them the same :)

     i gave the following line a try, from your eg, and it worked, thaks!

        ActiveSheet.range("A1").RESIZE(10, 10).Select

    • Marked as answer by Davexx Tuesday, April 3, 2018 9:53 AM
    • Unmarked as answer by Davexx Tuesday, April 3, 2018 10:04 AM
    Tuesday, April 3, 2018 9:53 AM
  • hi,  thanks,  i will check this.  i will be trying to resolve a few issues having.  pardon if i get not sure of what relevant to each.  (funny but couple of areas included are security,  file problems:  i am not that quick at vb at all/ get some code but making small syntax can take me 10 hour days..  re problem:  think i have put together most parts for a file repair,  checking bloated file, hidden ghost? embedded objects?,  maybe anchors for a comment gone to every cell;  putting together vb to address issues taking awhile).

    i will take any reference to checking general excel - office checks, troubleshooting..  if i can't find them myself :)

    thanks.

    Tuesday, April 3, 2018 10:03 AM